|
@ -1,7 +1,7 @@ |
|
|
'use strict'; |
|
|
'use strict'; |
|
|
import { Iterables } from '../system'; |
|
|
import { Iterables } from '../system'; |
|
|
import { QuickPickItem, QuickPickOptions, Uri, window } from 'vscode'; |
|
|
import { QuickPickItem, QuickPickOptions, Uri, window } from 'vscode'; |
|
|
import { Commands } from '../commands'; |
|
|
|
|
|
|
|
|
import { Commands, Keyboard } from '../commands'; |
|
|
import GitProvider, { GitCommit, GitLogCommit, GitUri } from '../gitProvider'; |
|
|
import GitProvider, { GitCommit, GitLogCommit, GitUri } from '../gitProvider'; |
|
|
import { CommitWithFileStatusQuickPickItem } from './gitQuickPicks'; |
|
|
import { CommitWithFileStatusQuickPickItem } from './gitQuickPicks'; |
|
|
import { CommandQuickPickItem, getQuickPickIgnoreFocusOut, OpenFileCommandQuickPickItem, OpenFilesCommandQuickPickItem } from './quickPicks'; |
|
|
import { CommandQuickPickItem, getQuickPickIgnoreFocusOut, OpenFileCommandQuickPickItem, OpenFilesCommandQuickPickItem } from './quickPicks'; |
|
@ -55,19 +55,21 @@ export class CommitDetailsQuickPick { |
|
|
items.splice(0, 0, goBackCommand); |
|
|
items.splice(0, 0, goBackCommand); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const result = await window.showQuickPick(items, { |
|
|
|
|
|
|
|
|
await Keyboard.instance.enterScope(['left', goBackCommand]); |
|
|
|
|
|
|
|
|
|
|
|
const pick = await window.showQuickPick(items, { |
|
|
matchOnDescription: true, |
|
|
matchOnDescription: true, |
|
|
matchOnDetail: true, |
|
|
matchOnDetail: true, |
|
|
placeHolder: `${commit.sha} \u2022 ${commit.author}, ${moment(commit.date).fromNow()} \u2022 ${commit.message}`, |
|
|
placeHolder: `${commit.sha} \u2022 ${commit.author}, ${moment(commit.date).fromNow()} \u2022 ${commit.message}`, |
|
|
ignoreFocusOut: getQuickPickIgnoreFocusOut() |
|
|
|
|
|
// onDidSelectItem: (item: QuickPickItem) => {
|
|
|
|
|
|
// if (item instanceof FileQuickPickItem) {
|
|
|
|
|
|
// item.preview();
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
ignoreFocusOut: getQuickPickIgnoreFocusOut(), |
|
|
|
|
|
onDidSelectItem: (item: QuickPickItem) => { |
|
|
|
|
|
Keyboard.instance.setKeyCommand('right', item); |
|
|
|
|
|
} |
|
|
} as QuickPickOptions); |
|
|
} as QuickPickOptions); |
|
|
|
|
|
|
|
|
return result; |
|
|
|
|
|
|
|
|
await Keyboard.instance.exitScope(); |
|
|
|
|
|
|
|
|
|
|
|
return pick; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -137,10 +139,19 @@ export class CommitFileDetailsQuickPick { |
|
|
items.splice(0, 0, goBackCommand); |
|
|
items.splice(0, 0, goBackCommand); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return await window.showQuickPick(items, { |
|
|
|
|
|
|
|
|
await Keyboard.instance.enterScope(['left', goBackCommand]); |
|
|
|
|
|
|
|
|
|
|
|
const pick = await window.showQuickPick(items, { |
|
|
matchOnDescription: true, |
|
|
matchOnDescription: true, |
|
|
placeHolder: `${commit.getFormattedPath()} \u2022 ${isUncommitted ? 'Uncommitted \u21E8 ' : '' }${commit.sha} \u2022 ${commit.author}, ${moment(commit.date).fromNow()} \u2022 ${commit.message}`, |
|
|
placeHolder: `${commit.getFormattedPath()} \u2022 ${isUncommitted ? 'Uncommitted \u21E8 ' : '' }${commit.sha} \u2022 ${commit.author}, ${moment(commit.date).fromNow()} \u2022 ${commit.message}`, |
|
|
ignoreFocusOut: getQuickPickIgnoreFocusOut() |
|
|
|
|
|
|
|
|
ignoreFocusOut: getQuickPickIgnoreFocusOut(), |
|
|
|
|
|
onDidSelectItem: (item: QuickPickItem) => { |
|
|
|
|
|
Keyboard.instance.setKeyCommand('right', item); |
|
|
|
|
|
} |
|
|
} as QuickPickOptions); |
|
|
} as QuickPickOptions); |
|
|
|
|
|
|
|
|
|
|
|
await Keyboard.instance.exitScope(); |
|
|
|
|
|
|
|
|
|
|
|
return pick; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |