* Fixes #7764

* Change KEY_RECORD_EVENT filter

* Update terminal.nim

* Revert changes and modify readPasswordFromStdIn
This commit is contained in:
Florent 2018-05-06 10:56:40 +02:00 • committed by Andreas Rumpf
commit d3ad467022

View file

@ -759,6 +759,10 @@ when defined(windows):
x = runeLenAt(password.string, i) x = runeLenAt(password.string, i)
inc i, x inc i, x
password.string.setLen(max(password.len - x, 0)) password.string.setLen(max(password.len - x, 0))
of chr(0x0):
# modifier key - ignore - for details see
# https://github.com/nim-lang/Nim/issues/7764
continue
else: else:
password.string.add(toUTF8(c.Rune)) password.string.add(toUTF8(c.Rune))
stdout.write "\n" stdout.write "\n"