mirror of https://github.com/Hilbis/Hilbish
feat: complete hint text on right arrow (#328)
parent
36ce05e85a
commit
c969f5ed15
|
@ -1,6 +1,9 @@
|
|||
# 🎀 Changelog
|
||||
|
||||
## Unreleased
|
||||
### Added
|
||||
- Forward/Right arrow key will fill in hint text (#327)
|
||||
|
||||
### Fixed
|
||||
- Skip over file and prevent panic if info cannot be retrieved during file completion (due to permission error or anything else)
|
||||
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -707,6 +707,9 @@ func (rl *Instance) escapeSeq(r []rune) {
|
|||
rl.renderHelpers()
|
||||
return
|
||||
}
|
||||
|
||||
rl.insertHintText()
|
||||
|
||||
if (rl.modeViMode == VimInsert && rl.pos < len(rl.line)) ||
|
||||
(rl.modeViMode != VimInsert && rl.pos < len(rl.line)-1) {
|
||||
rl.moveCursorByAdjust(1)
|
||||
|
|
Loading…
Reference in New Issue