-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(menu): wrong prev_window if opened from non-current window
1. dropbar_menu_t.prev_window is wrongly set to the current window i.e. the window get from vim.api.nvim_get_current_win() when the menu actually belongs to a non-current window 2. To reproduce: - Open nvim in split with dropbar.nvim attached to two windows, 1000 and 1001 - Keep the cursor in win 1001, open a menu in win 1000 by clicking a component in the winbar with mouse - prev_win of the menu is set to 1001 instead of 1000, and clicking on a symbol in the menu sets the cursor postion in 1001 instead of of 1000 3. Cause: dropbar_menu_t:open() will set dropbar_menu_t.prev_win to vim.api.nvim_get_current_win() 4. Fix: do not set prev_win explictly in dropbar_menu_t:open(), instead set it in the default on_click() callback function of dropbar_symbol_t when toggling or creating menus
- Loading branch information
bekaboo
committed
Jun 6, 2023
1 parent
1e56ced
commit 094f34d
Showing
4 changed files
with
58 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters