summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-03-10 13:20:32 +0100
committerAndreas Rumpf <rumpf_a@web.de>2017-03-10 13:20:32 +0100
commitc5566f7c375edeb0768753e27ef4c2ad5011b2a5 (patch)
tree61ba05150b78993d8fe66eafcc44ecb3df5c0c11 /compiler
parent68181e6da2ee22ad3411cd55f1c8b04df3d375cb (diff)
downloadNim-c5566f7c375edeb0768753e27ef4c2ad5011b2a5.tar.gz
nimsuggest: make 'con' work again
Diffstat (limited to 'compiler')
-rw-r--r--compiler/lexer.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/lexer.nim b/compiler/lexer.nim
index b2c2a7877..2bb228f41 100644
--- a/compiler/lexer.nim
+++ b/compiler/lexer.nim
@@ -1061,6 +1061,10 @@ proc rawGetTok*(L: var TLexer, tok: var TToken) =
         inc(L.bufpos)
       else:
         tok.tokType = tkParLe
+        when defined(nimsuggest):
+          if L.fileIdx == gTrackPos.fileIndex and tok.col < gTrackPos.col and
+                    tok.line == gTrackPos.line and gIdeCmd == ideCon:
+            gTrackPos.col = tok.col.int16
     of ')':
       tok.tokType = tkParRi
       inc(L.bufpos)