mirror of https://github.com/Hilbis/Hilbish
fix(readline): dont do anything if length of input rune slice is 0
this fixes an issue when readline splits multiline input. sometimes, the multiple lines just end up being "stray?" inputs of enter plus a newline. this can happen if a user attempts to prefire the enter key while a command is running, for examplepull/215/merge
parent
f7e725b5b9
commit
8d40179a73
|
@ -546,6 +546,10 @@ func (rl *Instance) Readline() (string, error) {
|
|||
// entry readline is currently configured for and then update the line entries
|
||||
// accordingly.
|
||||
func (rl *Instance) editorInput(r []rune) {
|
||||
if len(r) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
switch rl.modeViMode {
|
||||
case VimKeys:
|
||||
rl.vi(r[0])
|
||||
|
|
Loading…
Reference in New Issue