2
2
zrcadlo https://github.com/Hilbis/Hilbish synchronizováno 2025-07-18 16:52:02 +00:00

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 example
Tento commit je obsažen v:
TorchedSammy 2022-12-10 17:27:42 -04:00
rodič f7e725b5b9
revize 8d40179a73
Podepsáno: sammyette
ID GPG klíče: 904FC49417B44DCD

Zobrazit soubor

@ -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])