mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-14 07:13:27 +00:00
nimsuggest: make 'con' work again
This commit is contained in:
@@ -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)
|
||||
|
||||
13
nimsuggest/tests/tcon1.nim
Normal file
13
nimsuggest/tests/tcon1.nim
Normal file
@@ -0,0 +1,13 @@
|
||||
proc test(s: string; a: int) = discard
|
||||
proc testB(a, b: string) = discard
|
||||
test("hello here", #[!]#)
|
||||
testB(#[!]#
|
||||
|
||||
|
||||
discard """
|
||||
$nimsuggest --tester $file
|
||||
>con $1
|
||||
con;;skProc;;tcon1.test;;proc (s: string, a: int);;$file;;1;;5;;"";;100
|
||||
>con $2
|
||||
con;;skProc;;tcon1.testB;;proc (a: string, b: string);;$file;;2;;5;;"";;100
|
||||
"""
|
||||
Reference in New Issue
Block a user