Skip to content

Commit

Permalink
Update compiler/tools/suggest.nim
Browse files Browse the repository at this point in the history
Co-authored-by: zerbina <100542850+zerbina@users.noreply.github.com>
  • Loading branch information
bung87 and zerbina authored Sep 20, 2023
1 parent 717062f commit 8ea9851
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions compiler/tools/suggest.nim
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@ proc symToSuggest(g: ModuleGraph; s: PSym, isLocal: bool, section: IdeCmd, info:
result.filePath = toFullPath(g.config, infox)
result.line = toLinenumber(infox)
result.column = toColumn(infox)
if section in {ideHighlight}:
result.tokenLen = getTokenLenFromSource(g.config, s.name.s, infox)
else:
result.tokenLen = s.name.s.len
result.tokenLen = if section != ideHighlight:
s.name.s.len
else:
getTokenLenFromSource(g.config, s.name.s, infox)

proc `$`*(suggest: Suggest): string =
result = $suggest.section
Expand Down

0 comments on commit 8ea9851

Please sign in to comment.