mirror of https://github.com/Hilbis/Hilbish
feat: delete key on st and fix: delete key crash on xterm (#131)
* fix: delete key on st * fix: delete key crash on xterm Co-authored-by: Renzix <DanielDeBruno@renzix.com>pull/132/head
parent
34ae8ade7b
commit
52caedc1f1
|
@ -48,6 +48,7 @@ var (
|
|||
seqEnd = string([]byte{27, 91, 70})
|
||||
seqEndSc = string([]byte{27, 91, 52, 126})
|
||||
seqDelete = string([]byte{27, 91, 51, 126})
|
||||
seqDelete2 = string([]byte{27, 91, 80})
|
||||
seqShiftTab = string([]byte{27, 91, 90})
|
||||
seqAltQuote = string([]byte{27, 34}) // Added for showing registers ^["
|
||||
seqAltR = string([]byte{27, 114}) // Used for alternative history
|
||||
|
|
|
@ -712,12 +712,15 @@ func (rl *Instance) escapeSeq(r []rune) {
|
|||
rl.updateHelpers()
|
||||
return
|
||||
|
||||
case seqDelete:
|
||||
case seqDelete,seqDelete2:
|
||||
if rl.modeTabFind {
|
||||
rl.backspaceTabFind()
|
||||
} else {
|
||||
rl.deleteBackspace(true)
|
||||
if (rl.pos < len(rl.line)) {
|
||||
rl.deleteBackspace(true)
|
||||
}
|
||||
}
|
||||
|
||||
case seqHome, seqHomeSc:
|
||||
if rl.modeTabCompletion {
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue