m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-14 14:23:47 -05:00

Add toggle-hscroll

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