ソースを参照

Adds '/' key to rebase editor to open find

main
Eric Amodio 2年前
コミット
4fe03edb93
6個のファイルの変更19行の追加4行の削除
  1. +1
    -1
      CHANGELOG.md
  2. +1
    -0
      src/constants.ts
  3. +1
    -0
      src/webviews/apps/rebase/rebase.html
  4. +10
    -0
      src/webviews/apps/rebase/rebase.ts
  5. +1
    -3
      src/webviews/rebase/protocol.ts
  6. +5
    -0
      src/webviews/rebase/rebaseEditor.ts

+ 1
- 1
CHANGELOG.md ファイルの表示

@ -28,7 +28,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Adds new stash behaviors to use the Source Control (commit message) input box — closes [#2081](https://github.com/gitkraken/vscode-gitlens/issues/2081)
- When a stash is applied or popped and the Source Control input is empty, we will now update the Source Control input to the stash message
- When stashing changes and the Source Control input is not empty, we will now default the stash message input to the Source Control input value
- Adds the ability to search (<kbd>Ctrl</kbd>+<kbd>F</kbd>) for text on the Interactive Rebase Editor &mdash; closes [#2050](https://github.com/gitkraken/vscode-gitlens/issues/2050)
- Adds the ability to search (<kbd>/</kbd> or <kbd>Ctrl</kbd>+<kbd>F</kbd>) for text on the Interactive Rebase Editor &mdash; closes [#2050](https://github.com/gitkraken/vscode-gitlens/issues/2050)
- Adds stats (additions & deletions) to files nodes in comparisons &mdash; closes [#2078](https://github.com/gitkraken/vscode-gitlens/issues/2078) thanks to help via [PR #2079](https://github.com/gitkraken/vscode-gitlens/pull/2079) by Nafiur Rahman Khadem ([@ShafinKhadem](https://github.com/ShafinKhadem))
- Adds the ability to uniquely format uncommitted changes for the current line blame annotations &mdash; closes [#1987](https://github.com/gitkraken/vscode-gitlens/issues/1987)
- Adds a `gitlens.currentLine.uncommittedChangesFormat` setting to specify the uncommitted changes format of the current line blame annotation. **NOTE**: Setting this to an empty string will disable current line blame annotations for uncommitted changes

+ 1
- 0
src/constants.ts ファイルの表示

@ -277,6 +277,7 @@ export const enum CoreCommands {
CloseActiveEditor = 'workbench.action.closeActiveEditor',
CloseAllEditors = 'workbench.action.closeAllEditors',
CursorMove = 'cursorMove',
CustomEditorShowFindWidget = 'editor.action.webvieweditor.showFind',
Diff = 'vscode.diff',
EditorScroll = 'editorScroll',
EditorShowHover = 'editor.action.showHover',

+ 1
- 0
src/webviews/apps/rebase/rebase.html ファイルの表示

@ -34,6 +34,7 @@
<span class="shortcut"><kbd>d</kbd><span>Drop</span></span>
<span class="shortcut"><kbd>alt ↑</kbd><span>Move Up</span></span>
<span class="shortcut"><kbd>alt ↓</kbd><span>Move Down</span></span>
<span class="shortcut"><kbd>/</kbd><span>Search</span></span>
</div>
<div class="actions">
<div class="actions--left">

+ 10
- 0
src/webviews/apps/rebase/rebase.ts ファイルの表示

@ -10,6 +10,7 @@ import {
DisableCommandType,
MoveEntryCommandType,
ReorderCommandType,
SearchCommandType,
StartCommandType,
SwitchCommandType,
} from '../../rebase/protocol';
@ -122,6 +123,11 @@ class RebaseEditor extends App {
this.onAbortClicked();
}
} else if (e.key === '/') {
e.preventDefault();
e.stopPropagation();
this.onSearch();
}
}),
DOM.on('[data-action="start"]', 'click', () => this.onStartClicked()),
@ -268,6 +274,10 @@ class RebaseEditor extends App {
this.sendCommand(DisableCommandType, undefined);
}
private onSearch() {
this.sendCommand(SearchCommandType, undefined);
}
private onSelectChanged($el: HTMLSelectElement) {
const ref = $el.dataset.ref;
if (ref) {

+ 1
- 3
src/webviews/rebase/protocol.ts ファイルの表示

@ -43,11 +43,9 @@ export interface Commit {
// COMMANDS
export const AbortCommandType = new IpcCommandType('rebase/abort');
export const DisableCommandType = new IpcCommandType('rebase/disable');
export const SearchCommandType = new IpcCommandType('rebase/search');
export const StartCommandType = new IpcCommandType('rebase/start');
export const SwitchCommandType = new IpcCommandType('rebase/switch');
export interface ReorderParams {

+ 5
- 0
src/webviews/rebase/rebaseEditor.ts ファイルの表示

@ -23,6 +23,7 @@ import {
DisableCommandType,
MoveEntryCommandType,
ReorderCommandType,
SearchCommandType,
StartCommandType,
SwitchCommandType,
} from './protocol';
@ -275,6 +276,10 @@ export class RebaseEditorProvider implements CustomTextEditorProvider, Disposabl
onIpc(DisableCommandType, e, () => this.disable(context));
break;
case SearchCommandType.method:
onIpc(SearchCommandType, e, () => executeCoreCommand(CoreCommands.CustomEditorShowFindWidget));
break;
case StartCommandType.method:
onIpc(StartCommandType, e, () => this.rebase(context));
break;

読み込み中…
キャンセル
保存