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