File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -52,11 +52,15 @@ var terminatingChars = []rune{
5252}
5353
5454func hasTerminateChar (input string ) bool {
55+ if input == "" {
56+ return false
57+ }
58+
5559 return slices .Contains (terminatingChars , []rune (input )[0 ])
5660}
5761
5862func (s * session ) Update (ctx gvcode.CompletionContext ) []gvcode.CompletionCandidate {
59- if s .canceled || ctx . Input == "" {
63+ if s .canceled {
6064 return nil
6165 }
6266
@@ -76,7 +80,7 @@ func (s *session) Update(ctx gvcode.CompletionContext) []gvcode.CompletionCandid
7680
7781 s .ctx = ctx
7882
79- if isSymbolChar ([]rune (s .ctx .Input )[0 ]) {
83+ if ctx . Input != "" && isSymbolChar ([]rune (s .ctx .Input )[0 ]) {
8084 s .prefix = append (s .prefix , []rune (ctx .Input )... )
8185 if s .prefixRange == (gvcode.EditRange {}) {
8286 start := ctx .Position
You can’t perform that action at this time.
0 commit comments