File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -28,10 +28,10 @@ interface IGrepCommandArguments {
28
28
// Implements :grep
29
29
// https://vimdoc.sourceforge.net/htmldoc/quickfix.html#:vimgrep
30
30
export class GrepCommand extends ExCommand {
31
+ // TODO: pattern match the entire command to see if there are slashes and a flag to determine what to parse
31
32
public static readonly argParser : Parser < GrepCommand > = optWhitespace . then (
32
33
seq (
33
- Pattern . parser ( { direction : SearchDirection . Backward , delimiter : ' ' } ) ,
34
-
34
+ Pattern . parser ( { direction : SearchDirection . Backward , delimiter : '' } ) ,
35
35
fileNameParser . sepBy ( whitespace ) ,
36
36
) . map ( ( [ pattern , files ] ) => new GrepCommand ( { pattern, files } ) ) ,
37
37
) ;
@@ -64,6 +64,8 @@ export class GrepCommand extends ExCommand {
64
64
isRegex : true ,
65
65
} ) ;
66
66
await vscode . commands . executeCommand ( 'search.action.focusSearchList' ) ;
67
+ // Only if there's no [j] flag
68
+ await vscode . commands . executeCommand ( 'search.action.focusNextSearchResult' ) ;
67
69
// TODO: this will always throw an error, since the command returns nothing
68
70
// if (!grepResults) {
69
71
// throw error.VimError.fromCode(error.ErrorCode.PatternNotFound);
You can’t perform that action at this time.
0 commit comments