nimsuggest: make 'con' work again
This commit is contained in:
parent
68181e6da2
commit
c5566f7c37
2 changed files with 17 additions and 0 deletions
|
|
@ -1061,6 +1061,10 @@ proc rawGetTok*(L: var TLexer, tok: var TToken) =
|
||||||
inc(L.bufpos)
|
inc(L.bufpos)
|
||||||
else:
|
else:
|
||||||
tok.tokType = tkParLe
|
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 ')':
|
of ')':
|
||||||
tok.tokType = tkParRi
|
tok.tokType = tkParRi
|
||||||
inc(L.bufpos)
|
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
|
||||||
|
"""
|
||||||
Loading…
Add table
Add a link
Reference in a new issue