mirror of https://github.com/Hilbis/Hilbish
feat: added alt backspace keybinding (#132)
Co-authored-by: Renzix <DanielDeBruno@renzix.com>pull/133/head
parent
52caedc1f1
commit
0ebd8d9035
|
@ -52,6 +52,7 @@ var (
|
|||
seqShiftTab = string([]byte{27, 91, 90})
|
||||
seqAltQuote = string([]byte{27, 34}) // Added for showing registers ^["
|
||||
seqAltR = string([]byte{27, 114}) // Used for alternative history
|
||||
seqAltBackspace = string([]byte{27, 127})
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -755,6 +755,19 @@ func (rl *Instance) escapeSeq(r []rune) {
|
|||
rl.updateTabFind([]rune{})
|
||||
rl.viUndoSkipAppend = true
|
||||
|
||||
case seqAltBackspace:
|
||||
if rl.modeTabCompletion {
|
||||
rl.resetVirtualComp(false)
|
||||
}
|
||||
// This is only available in Insert mode
|
||||
if rl.modeViMode != VimInsert {
|
||||
return
|
||||
}
|
||||
|
||||
rl.saveToRegister(rl.viJumpB(tokeniseLine))
|
||||
rl.viDeleteByAdjust(rl.viJumpB(tokeniseLine))
|
||||
rl.updateHelpers()
|
||||
|
||||
default:
|
||||
if rl.modeTabFind {
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue