Skip to content

Commit bf1df91

Browse files
committed
merege
1 parent edbd24f commit bf1df91

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler/tools/suggest.nim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,10 @@ proc symToSuggest(g: ModuleGraph; s: PSym, isLocal: bool, section: IdeCmd, info:
203203
result.filePath = toFullPath(g.config, infox)
204204
result.line = toLinenumber(infox)
205205
result.column = toColumn(infox)
206-
if section in {ideHighlight}:
207-
result.tokenLen = getTokenLenFromSource(g.config, s.name.s, infox)
208-
else:
209-
result.tokenLen = s.name.s.len
206+
result.tokenLen = if section != ideHighlight:
207+
s.name.s.len
208+
else:
209+
getTokenLenFromSource(g.config, s.name.s, infox)
210210

211211
proc `$`*(suggest: Suggest): string =
212212
result = $suggest.section

0 commit comments

Comments
 (0)