Fixed regression on autocompletion; dictionaries accept string keys.
h3rald h3rald@h3rald.com
Fri, 07 Oct 2016 15:04:47 +0200
3 files changed,
3 insertions(+),
3 deletions(-)
M
core/linedit.nim
→
core/linedit.nim
@@ -289,7 +289,7 @@ else:
word = ed.line.fromStart var matches = compl.filterIt(it.toLowerAscii.startsWith(word.toLowerAscii)) if ed.line.fromStart.len > 0 and matches.len > 0: - for i in 0..word.len: + for i in 0..word.len-1: ed.deletePrevious var n = 0 if matches.len > 0:@@ -303,7 +303,6 @@ if n < matches.len:
let diff = ed.line.position - position for i in 0.countup(diff-1 + word.len): ed.deletePrevious - ed.line.position = position ed.addToLineAtPosition(matches[n]) ch = getchar() else:
M
core/value.nim
→
core/value.nim
@@ -35,7 +35,7 @@ return false
if q.qVal.len == 0: return true for val in q.qVal: - if not val.isQuotation or val.qVal.len != 2 or not val.qVal[0].isSymbol: + if not val.isQuotation or val.qVal.len != 2 or not (val.qVal[0].isSymbol or val.qVal[0].isString): return false return true