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
Renzix 2022-03-29 20:35:51 -04:00 committed by GitHub
parent 34ae8ade7b
commit 52caedc1f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

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

View File

@ -712,12 +712,15 @@ func (rl *Instance) escapeSeq(r []rune) {
rl.updateHelpers()
return
case seqDelete:
case seqDelete,seqDelete2:
if rl.modeTabFind {
rl.backspaceTabFind()
} else {
if (rl.pos < len(rl.line)) {
rl.deleteBackspace(true)
}
}
case seqHome, seqHomeSc:
if rl.modeTabCompletion {
return