Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Mouse click on picker are ignored and go to the buffer #12745

Open
howesteve opened this issue Feb 1, 2025 · 1 comment · May be fixed by #12772
Open

Mouse click on picker are ignored and go to the buffer #12745

howesteve opened this issue Feb 1, 2025 · 1 comment · May be fixed by #12772

Comments

@howesteve
Copy link

Minor click Helix 25.01.1

  1. Open helix in some random project's folder. Open any file.
  2. Make sure current buffer line is highlighted (i.e. :set cursorline true)
  3. Space + / to open the global search
  4. Enter any random text like ".". Several matching files will be listed in the picker.
  5. Try to click some of the entries from the picker. You'll see actually the buffer behind the picker getting the click event and the current highlighted line behind changes.
@nik-rev
Copy link
Contributor

nik-rev commented Feb 1, 2025

Yeah the picker is currently not handling Event::Mouse:

        let key_event = match event {
            Event::Key(event) => *event,
            Event::Paste(..) => return self.prompt_handle_event(event, ctx),
            Event::Resize(..) => return EventResult::Consumed(None),
            _ => return EventResult::Ignored(None),
        };

as you can see mouse events are ignored. To fix this, MouseEvent should be handled accordingly

@renshyle renshyle linked a pull request Feb 4, 2025 that will close this issue
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants