@@ -46,13 +46,11 @@ export interface ISuggestEvent {
46
46
readonly isFrozen : boolean ;
47
47
readonly auto : boolean ;
48
48
readonly shy : boolean ;
49
- readonly noSelect : boolean ;
50
49
}
51
50
52
51
export interface SuggestTriggerContext {
53
52
readonly auto : boolean ;
54
53
readonly shy : boolean ;
55
- readonly noSelect : boolean ;
56
54
readonly triggerKind ?: CompletionTriggerKind ;
57
55
readonly triggerCharacter ?: string ;
58
56
}
@@ -86,16 +84,14 @@ export class LineContext {
86
84
readonly leadingWord : IWordAtPosition ;
87
85
readonly auto : boolean ;
88
86
readonly shy : boolean ;
89
- readonly noSelect : boolean ;
90
87
91
- constructor ( model : ITextModel , position : Position , auto : boolean , shy : boolean , noSelect : boolean ) {
88
+ constructor ( model : ITextModel , position : Position , auto : boolean , shy : boolean ) {
92
89
this . leadingLineContent = model . getLineContent ( position . lineNumber ) . substr ( 0 , position . column - 1 ) ;
93
90
this . leadingWord = model . getWordUntilPosition ( position ) ;
94
91
this . lineNumber = position . lineNumber ;
95
92
this . column = position . column ;
96
93
this . auto = auto ;
97
94
this . shy = shy ;
98
- this . noSelect = noSelect ;
99
95
}
100
96
}
101
97
@@ -285,7 +281,7 @@ export class SuggestModel implements IDisposable {
285
281
const existing = this . _completionModel
286
282
? { items : this . _completionModel . adopt ( supports ) , clipboardText : this . _completionModel . clipboardText }
287
283
: undefined ;
288
- this . trigger ( { auto : true , shy : false , noSelect : false , triggerCharacter : lastChar } , Boolean ( this . _completionModel ) , supports , existing ) ;
284
+ this . trigger ( { auto : true , shy : false , triggerCharacter : lastChar } , Boolean ( this . _completionModel ) , supports , existing ) ;
289
285
}
290
286
} ;
291
287
@@ -320,7 +316,7 @@ export class SuggestModel implements IDisposable {
320
316
if ( ! this . _editor . hasModel ( ) || ! this . _languageFeaturesService . completionProvider . has ( this . _editor . getModel ( ) ) ) {
321
317
this . cancel ( ) ;
322
318
} else {
323
- this . trigger ( { auto : this . _state === State . Auto , shy : false , noSelect : false } , true ) ;
319
+ this . trigger ( { auto : this . _state === State . Auto , shy : false } , true ) ;
324
320
}
325
321
}
326
322
}
@@ -419,7 +415,7 @@ export class SuggestModel implements IDisposable {
419
415
}
420
416
421
417
// we made it till here -> trigger now
422
- this . trigger ( { auto : true , shy : false , noSelect : false } ) ;
418
+ this . trigger ( { auto : true , shy : false } ) ;
423
419
424
420
} , this . _editor . getOption ( EditorOption . quickSuggestionsDelay ) ) ;
425
421
}
@@ -429,7 +425,7 @@ export class SuggestModel implements IDisposable {
429
425
430
426
const model = this . _editor . getModel ( ) ;
431
427
const position = this . _editor . getPosition ( ) ;
432
- const ctx = new LineContext ( model , position , this . _state === State . Auto , false , false ) ;
428
+ const ctx = new LineContext ( model , position , this . _state === State . Auto , false ) ;
433
429
this . _onNewContext ( ctx ) ;
434
430
}
435
431
@@ -440,7 +436,7 @@ export class SuggestModel implements IDisposable {
440
436
441
437
const model = this . _editor . getModel ( ) ;
442
438
const auto = context . auto ;
443
- const ctx = new LineContext ( model , this . _editor . getPosition ( ) , auto , context . shy , context . noSelect ) ;
439
+ const ctx = new LineContext ( model , this . _editor . getPosition ( ) , auto , context . shy ) ;
444
440
445
441
// Cancel previous requests, change state & update UI
446
442
this . cancel ( retrigger ) ;
@@ -515,7 +511,7 @@ export class SuggestModel implements IDisposable {
515
511
items = items . concat ( existing . items ) . sort ( cmpFn ) ;
516
512
}
517
513
518
- const ctx = new LineContext ( model , this . _editor . getPosition ( ) , auto , context . shy , context . noSelect ) ;
514
+ const ctx = new LineContext ( model , this . _editor . getPosition ( ) , auto , context . shy ) ;
519
515
const fuzzySearchOptions = {
520
516
...FuzzyScoreOptions . default ,
521
517
firstMatchCanBeWeak : ! this . _editor . getOption ( EditorOption . suggest ) . matchOnWordStartOnly
@@ -629,7 +625,7 @@ export class SuggestModel implements IDisposable {
629
625
if ( ctx . column < this . _context . column ) {
630
626
// typed -> moved cursor LEFT -> retrigger if still on a word
631
627
if ( ctx . leadingWord . word ) {
632
- this . trigger ( { auto : this . _context . auto , shy : false , noSelect : false } , true ) ;
628
+ this . trigger ( { auto : this . _context . auto , shy : false } , true ) ;
633
629
} else {
634
630
this . cancel ( ) ;
635
631
}
@@ -651,15 +647,15 @@ export class SuggestModel implements IDisposable {
651
647
inactiveProvider . delete ( provider ) ;
652
648
}
653
649
const items = this . _completionModel . adopt ( new Set ( ) ) ;
654
- this . trigger ( { auto : this . _context . auto , shy : false , noSelect : false } , true , inactiveProvider , { items, clipboardText : this . _completionModel . clipboardText } ) ;
650
+ this . trigger ( { auto : this . _context . auto , shy : false } , true , inactiveProvider , { items, clipboardText : this . _completionModel . clipboardText } ) ;
655
651
return ;
656
652
}
657
653
658
654
if ( ctx . column > this . _context . column && this . _completionModel . incomplete . size > 0 && ctx . leadingWord . word . length !== 0 ) {
659
655
// typed -> moved cursor RIGHT & incomple model & still on a word -> retrigger
660
656
const { incomplete } = this . _completionModel ;
661
657
const items = this . _completionModel . adopt ( incomplete ) ;
662
- this . trigger ( { auto : this . _state === State . Auto , shy : false , noSelect : false , triggerKind : CompletionTriggerKind . TriggerForIncompleteCompletions } , true , incomplete , { items, clipboardText : this . _completionModel . clipboardText } ) ;
658
+ this . trigger ( { auto : this . _state === State . Auto , shy : false , triggerKind : CompletionTriggerKind . TriggerForIncompleteCompletions } , true , incomplete , { items, clipboardText : this . _completionModel . clipboardText } ) ;
663
659
664
660
} else {
665
661
// typed -> moved cursor RIGHT -> update UI
@@ -675,7 +671,7 @@ export class SuggestModel implements IDisposable {
675
671
676
672
if ( LineContext . shouldAutoTrigger ( this . _editor ) && this . _context . leadingWord . endColumn < ctx . leadingWord . startColumn ) {
677
673
// retrigger when heading into a new word
678
- this . trigger ( { auto : this . _context . auto , shy : false , noSelect : false } , true ) ;
674
+ this . trigger ( { auto : this . _context . auto , shy : false } , true ) ;
679
675
return ;
680
676
}
681
677
@@ -702,7 +698,6 @@ export class SuggestModel implements IDisposable {
702
698
completionModel : this . _completionModel ,
703
699
auto : this . _context . auto ,
704
700
shy : this . _context . shy ,
705
- noSelect : this . _context . noSelect ,
706
701
isFrozen,
707
702
} ) ;
708
703
}
0 commit comments