mirror of
https://github.com/Hilbis/Hilbish
synced 2025-04-27 16:03:23 +00:00
refactor: move hint insert to function
This commit is contained in:
parent
a59394ec2b
commit
b311f24b3f
@ -56,3 +56,10 @@ func (rl *Instance) resetHintText() {
|
||||
//rl.hintY = 0
|
||||
rl.hintText = []rune{}
|
||||
}
|
||||
|
||||
func (rl *Instance) insertHintText() {
|
||||
if len(rl.hintText) != 0 {
|
||||
// fill in hint text
|
||||
rl.insert(rl.hintText)
|
||||
}
|
||||
}
|
||||
|
@ -708,10 +708,8 @@ func (rl *Instance) escapeSeq(r []rune) {
|
||||
return
|
||||
}
|
||||
|
||||
if len(rl.hintText) != 0 {
|
||||
// fill in hint text
|
||||
rl.insert(rl.hintText)
|
||||
}
|
||||
rl.insertHintText()
|
||||
|
||||
if (rl.modeViMode == VimInsert && rl.pos < len(rl.line)) ||
|
||||
(rl.modeViMode != VimInsert && rl.pos < len(rl.line)-1) {
|
||||
rl.moveCursorByAdjust(1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user