From 6e3c830cd26194775ad18d565b1d96df8ae945f0 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sun, 6 Jul 2025 10:05:25 +0900 Subject: Add 'multi' event triggered on multi-selection changes --- src/terminal.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/terminal.go') diff --git a/src/terminal.go b/src/terminal.go index 8b5529fe..634d7859 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -5399,6 +5399,7 @@ func (t *Terminal) Loop() error { } previousInput := t.input previousCx := t.cx + previousVersion := t.version t.lastKey = event.KeyName() updatePreviewWindow := func(forcePreview bool) { t.resizeWindows(forcePreview, false) @@ -6656,6 +6657,9 @@ func (t *Terminal) Loop() error { if onEOFs, prs := t.keymap[tui.BackwardEOF.AsEvent()]; beof && prs && !doActions(onEOFs) { continue } + if onMultis, prs := t.keymap[tui.Multi.AsEvent()]; t.version != previousVersion && prs && !doActions(onMultis) { + continue + } } else { jumpEvent := tui.JumpCancel if event.Type == tui.Rune { -- cgit v1.2.3