From e91f10ab167f10328816fab65fc38370059986f3 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Mon, 27 Jan 2025 01:10:08 +0900 Subject: Enhance click-header event * Expose the name of the mouse action as $FZF_KEY * Trigger click-header on mouse up * Enhanced clickable header for `kill` completion --- src/tui/light.go | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/tui/light.go') diff --git a/src/tui/light.go b/src/tui/light.go index 56e9ae0b..54c38c18 100644 --- a/src/tui/light.go +++ b/src/tui/light.go @@ -626,15 +626,13 @@ func (r *LightRenderer) mouseSequence(sz *int) Event { // middle := t & 0b1 left := t&0b11 == 0 - - // shift := t & 0b100 - // ctrl := t & 0b1000 - mod := t&0b1100 > 0 - - drag := t&0b100000 > 0 + ctrl := t&0b10000 > 0 + alt := t&0b01000 > 0 + shift := t&0b00100 > 0 + drag := t&0b100000 > 0 // 32 if scroll != 0 { - return Event{Mouse, 0, &MouseEvent{y, x, scroll, false, false, false, mod}} + return Event{Mouse, 0, &MouseEvent{y, x, scroll, false, false, false, ctrl, alt, shift}} } double := false @@ -658,7 +656,7 @@ func (r *LightRenderer) mouseSequence(sz *int) Event { } } } - return Event{Mouse, 0, &MouseEvent{y, x, 0, left, down, double, mod}} + return Event{Mouse, 0, &MouseEvent{y, x, 0, left, down, double, ctrl, alt, shift}} } func (r *LightRenderer) smcup() { -- cgit v1.2.3