windows fixes

This commit is contained in:
Productive2 2021-02-20 19:03:54 +01:00
parent 82b18c1cd4
commit f79677ba14
2 changed files with 3 additions and 3 deletions

View File

@ -79,8 +79,8 @@ block:
# ctrl+moves
defEscSeq(@[224, 134], jkCtrlPageUp)
defEscSeq(@[224, 118], jkCtrlPageDown)
defEscSeq(@[224, 115], jkCtrlHome)
defEscSeq(@[224, 116], jkCtrlEnd)
defEscSeq(@[224, 119], jkCtrlHome)
defEscSeq(@[224, 117], jkCtrlEnd)
# special keys
defEscSeq(@[8], jkBackspace)

View File

@ -9,7 +9,7 @@ proc renderLine*(prompt: string, content: string, hscroll: int = 0) =
setCursorXPos(0)
var content = prompt & content
if content.len() < terminalWidth():
content &= " ".repeat(terminalWidth() - content.len())
content &= " ".repeat(terminalWidth() - content.len() - 1)
if content.len() > terminalWidth():
var lower = hscroll
var upper = hscroll + terminalWidth() - 1