Add toggle-hscroll
Some checks are pending
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run

This commit is contained in:
Junegunn Choi
2024-12-19 21:01:16 +09:00
parent e60a9a628b
commit ca5e633399
5 changed files with 82 additions and 67 deletions

View File

@@ -464,6 +464,7 @@ const (
actToggleHeader
actToggleWrap
actToggleMultiLine
actToggleHscroll
actTrackCurrent
actUntrackCurrent
actDown
@@ -4643,6 +4644,11 @@ func (t *Terminal) Loop() error {
case actToggleMultiLine:
t.multiLine = !t.multiLine
req(reqList)
case actToggleHscroll:
// Force re-rendering of the list
t.prevLines = make([]itemLine, len(t.prevLines))
t.hscroll = !t.hscroll
req(reqList)
case actTrackCurrent:
if t.track == trackDisabled {
t.track = trackCurrent