diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2025-01-27 01:10:08 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2025-01-27 01:10:08 +0900 |
| commit | e91f10ab167f10328816fab65fc38370059986f3 (patch) | |
| tree | f8e7d059843f3a7a81835a888fe29d7588ee4038 /src/tui/light.go | |
| parent | 2c15cd792306119ead573c473c982b6996e11952 (diff) | |
| download | fzf-e91f10ab167f10328816fab65fc38370059986f3.tar.gz | |
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
Diffstat (limited to 'src/tui/light.go')
| -rw-r--r-- | src/tui/light.go | 14 |
1 files changed, 6 insertions, 8 deletions
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() { |
