all repos — min @ f2336ecbed81855af87bd523c0b9ca8c436ade31

A small but practical concatenative programming language.

Fixed completions; fixed incorrect line position after backspace at end
of line.
h3rald h3rald@h3rald.com
Sun, 18 Sep 2016 12:09:27 +0200
commit

f2336ecbed81855af87bd523c0b9ca8c436ade31

parent

5250fe069dbdae55743a5e848abb45260148772d

2 files changed, 9 insertions(+), 4 deletions(-)

jump to
M core/linedit.nimcore/linedit.nim

@@ -149,6 +149,7 @@ if ed.line.full:

stdout.cursorBackward putchar(32) stdout.cursorBackward + ed.line.position.dec ed.line.text = ed.line.text[0..ed.line.last-1] else: let rest = ed.line.toEnd & " "

@@ -208,7 +209,7 @@ let toEnd = ed.line.toEnd

let diff = toEnd.len - s.len for c in s: ed.printChar(c.ord) - ed.printChar(32) + #ed.printChar(32) proc clearLine*(ed: var LineEditor) = stdout.cursorBackward(ed.line.position+1)
M minim.nimminim.nim

@@ -84,10 +84,14 @@ if f[f.len-1] != '/':

f = f & "/" return toSeq(walkDir(f, true)).mapIt("\"$1$2\"" % [f, it.path.replace("\\", "/")]) else: - let dir = f.parentDir - let file = f.extractFileName - if dir.existsDir: + var dir: string + if f.contains("/") or dir.contains("\\"): + dir = f.parentDir + let file = f.extractFileName return toSeq(walkDir(dir, true)).filterIt(it.path.startsWith(file)).mapIt("\"$1/$2\"" % [dir, it.path.replace("\\", "/")]) + else: + dir = getCurrentDir() + return toSeq(walkDir(dir, true)).filterIt(it.path.startsWith(f)).mapIt("\"$1\"" % [it.path.replace("\\", "/")]) return symbols proc stdLib(i: In) =