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()
|
rl.clearHelpers()
|
||||||
return "", CtrlC
|
return "", CtrlC
|
||||||
|
|
||||||
case charEOF:
|
case charEOF: // ctrl d
|
||||||
|
if len(rl.line) == 0 {
|
||||||
rl.clearHelpers()
|
rl.clearHelpers()
|
||||||
return "", EOF
|
return "", EOF
|
||||||
|
}
|
||||||
|
if rl.modeTabFind {
|
||||||
|
rl.backspaceTabFind()
|
||||||
|
} else {
|
||||||
|
if (rl.pos < len(rl.line)) {
|
||||||
|
rl.deleteBackspace(true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Clear screen
|
// Clear screen
|
||||||
case charCtrlL:
|
case charCtrlL:
|
||||||
|
|
Loading…
Reference in New Issue