mirror of https://github.com/Hilbis/Hilbish
feat: make ctrl d delete char below cursor if line isnt empty
parent
f002eca258
commit
1715a1f626
|
@ -170,9 +170,18 @@ func (rl *Instance) Readline() (string, error) {
|
|||
rl.clearHelpers()
|
||||
return "", CtrlC
|
||||
|
||||
case charEOF:
|
||||
rl.clearHelpers()
|
||||
return "", EOF
|
||||
case charEOF: // ctrl d
|
||||
if len(rl.line) == 0 {
|
||||
rl.clearHelpers()
|
||||
return "", EOF
|
||||
}
|
||||
if rl.modeTabFind {
|
||||
rl.backspaceTabFind()
|
||||
} else {
|
||||
if (rl.pos < len(rl.line)) {
|
||||
rl.deleteBackspace(true)
|
||||
}
|
||||
}
|
||||
|
||||
// Clear screen
|
||||
case charCtrlL:
|
||||
|
|
Loading…
Reference in New Issue