Skip to content

Commit

Permalink
[bugfix] fix #11482, fix nimsuggest range error (#11519)
Browse files Browse the repository at this point in the history
The default starting parameters for `line` and `col` were switched.

See line 141: "line starts at 1, column at 0, dirtyfile is optional".
Also, in `TLineInfo` object, `line` is uint16, `col` is int16.

(cherry picked from commit 6cad5c7)
  • Loading branch information
narimiran committed Jun 20, 2019
1 parent 1348cb5 commit dacd1d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nimsuggest/nimsuggest.nim
Expand Up @@ -445,8 +445,8 @@ proc execCmd(cmd: string; graph: ModuleGraph; cachedMsgs: CachedMsgs) =
if i < cmd.len and cmd[i] == ';':
i = parseQuoted(cmd, dirtyfile, i+1)
i += skipWhile(cmd, seps, i)
var line = -1
var col = 0
var line = 0
var col = -1
i += parseInt(cmd, line, i)
i += skipWhile(cmd, seps, i)
i += parseInt(cmd, col, i)
Expand Down

0 comments on commit dacd1d0

Please sign in to comment.