mirror of https://github.com/Hilbis/Hilbish
chore: merge from master
commit
75b51075b8
|
@ -48,9 +48,11 @@ var (
|
||||||
seqEnd = string([]byte{27, 91, 70})
|
seqEnd = string([]byte{27, 91, 70})
|
||||||
seqEndSc = string([]byte{27, 91, 52, 126})
|
seqEndSc = string([]byte{27, 91, 52, 126})
|
||||||
seqDelete = string([]byte{27, 91, 51, 126})
|
seqDelete = string([]byte{27, 91, 51, 126})
|
||||||
|
seqDelete2 = string([]byte{27, 91, 80})
|
||||||
seqShiftTab = string([]byte{27, 91, 90})
|
seqShiftTab = string([]byte{27, 91, 90})
|
||||||
seqAltQuote = string([]byte{27, 34}) // Added for showing registers ^["
|
seqAltQuote = string([]byte{27, 34}) // Added for showing registers ^["
|
||||||
seqAltR = string([]byte{27, 114}) // Used for alternative history
|
seqAltR = string([]byte{27, 114}) // Used for alternative history
|
||||||
|
seqAltBackspace = string([]byte{27, 127})
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -712,12 +712,15 @@ func (rl *Instance) escapeSeq(r []rune) {
|
||||||
rl.updateHelpers()
|
rl.updateHelpers()
|
||||||
return
|
return
|
||||||
|
|
||||||
case seqDelete:
|
case seqDelete,seqDelete2:
|
||||||
if rl.modeTabFind {
|
if rl.modeTabFind {
|
||||||
rl.backspaceTabFind()
|
rl.backspaceTabFind()
|
||||||
} else {
|
} else {
|
||||||
|
if (rl.pos < len(rl.line)) {
|
||||||
rl.deleteBackspace(true)
|
rl.deleteBackspace(true)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
case seqHome, seqHomeSc:
|
case seqHome, seqHomeSc:
|
||||||
if rl.modeTabCompletion {
|
if rl.modeTabCompletion {
|
||||||
return
|
return
|
||||||
|
@ -752,6 +755,19 @@ func (rl *Instance) escapeSeq(r []rune) {
|
||||||
rl.updateTabFind([]rune{})
|
rl.updateTabFind([]rune{})
|
||||||
rl.viUndoSkipAppend = true
|
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:
|
default:
|
||||||
if rl.modeTabFind {
|
if rl.modeTabFind {
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue