Skip to content

fix: mouse click on quickfix buffer#176

Open
Thaumy wants to merge 1 commit intokevinhwang91:mainfrom
Thaumy:main
Open

fix: mouse click on quickfix buffer#176
Thaumy wants to merge 1 commit intokevinhwang91:mainfrom
Thaumy:main

Conversation

@Thaumy
Copy link
Copy Markdown

@Thaumy Thaumy commented Mar 18, 2026

Previously, double-clicking a quickfix entry opened a new window, while <CR> reused the existing one. This was caused by the preview mouse mapping overriding the default <2-LeftMouse> behavior.

Additionally, nvim_set_current_win was called unnecessarily when clicking within the quickfix window itself.

Changes:

  • Emit <CR> on double left-click to ensure consistent behavior
  • Remove overridden <2-LeftMouse> mapping
  • Skip nvim_set_current_win if the clicked window is qflist

Before this patch:

zipped_before.mp4

After this patch:

zipped_after.mp4

Previously, double-clicking a quickfix entry opened a new window,
while `<CR>` reused the existing one. This was caused by the preview
mouse mapping overriding the default `<2-LeftMouse>` behavior.

Additionally, nvim_set_current_win was called unnecessarily when
clicking within the quickfix window itself.

Changes:
- Emit `<CR>` on double left-click to ensure consistent behavior
- Remove overridden `<2-LeftMouse>` mapping
- Skip `nvim_set_current_win` if the clicked window is qflist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant