File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
src/vs/editor/contrib/inlineCompletions/browser Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,10 @@ export class GhostTextReplacement {
114
114
get lineCount ( ) : number {
115
115
return this . newLines . length ;
116
116
}
117
+
118
+ isEmpty ( ) : boolean {
119
+ return this . parts . every ( p => p . lines . length === 0 ) ;
120
+ }
117
121
}
118
122
119
123
export type GhostTextOrReplacement = GhostText | GhostTextReplacement ;
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ export class InlineCompletionContextKeys extends Disposable {
33
33
const suggestion = model ?. selectedInlineCompletion . read ( reader ) ;
34
34
const ghostText = model ?. ghostText . read ( reader ) ;
35
35
const selectedSuggestItem = model ?. selectedSuggestItem . read ( reader ) ;
36
- this . inlineCompletionVisible . set ( selectedSuggestItem === undefined && ghostText !== undefined ) ;
36
+ this . inlineCompletionVisible . set ( selectedSuggestItem === undefined && ghostText !== undefined && ! ghostText . isEmpty ( ) ) ;
37
37
38
38
if ( ghostText && suggestion ) {
39
39
this . suppressSuggestions . set ( suggestion . inlineCompletion . source . inlineCompletions . suppressSuggestions ) ;
You can’t perform that action at this time.
0 commit comments