make more tests green

This commit is contained in:
Andreas Rumpf 2018-08-13 12:29:03 +02:00
commit 7f49364fd0
16 changed files with 39 additions and 102 deletions

View file

@ -109,7 +109,7 @@ proc sexp(s: IdeCmd|TSymKind|PrefixMatch): SexpNode = sexp($s)
proc sexp(s: Suggest): SexpNode =
# If you change the order here, make sure to change it over in
# nim-mode.el too.
let qp = if s.qualifiedPath.isNil: @[] else: s.qualifiedPath
let qp = if s.qualifiedPath.len == 0: @[] else: s.qualifiedPath
result = convertSexp([
s.section,
TSymKind s.symkind,
@ -176,7 +176,7 @@ proc execute(cmd: IdeCmd, file, dirtyfile: string, line, col: int;
let dirtyIdx = fileInfoIdx(conf, file, isKnownFile)
if dirtyfile.len != 0: msgs.setDirtyFile(conf, dirtyIdx, dirtyfile)
else: msgs.setDirtyFile(conf, dirtyIdx, nil)
else: msgs.setDirtyFile(conf, dirtyIdx, "")
conf.m.trackPos = newLineInfo(dirtyIdx, line, col)
conf.m.trackPosAttached = false
@ -209,7 +209,7 @@ proc executeEpc(cmd: IdeCmd, args: SexpNode;
column = args[2].getNum
var dirtyfile = ""
if len(args) > 3:
dirtyfile = args[3].getStr(nil)
dirtyfile = args[3].getStr("")
execute(cmd, file, dirtyfile, int(line), int(column), graph)
proc returnEpc(socket: Socket, uid: BiggestInt, s: SexpNode|string,