-
|
Hi, great plugin, but after looking through the README I can't see if there's a way to do the following:
I saw here how to make it not expand the component when I click |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
Ok for now I solved it by overriding default_on_click and adding the below lines at the end. local function default_on_click(symbol, _, _, _, _)
-- ... default code ...
-- click on the component, as per:
-- https://github.com/Bekaboo/dropbar.nvim/issues/66#issuecomment-1664295286
local api = require('dropbar.api')
local menu = api.get_current_dropbar_menu()
if not menu then
return
end
local cursor = vim.api.nvim_win_get_cursor(menu.win)
local entry = menu.entries[cursor[1]]
local component =
entry:first_clickable(entry.padding.left + entry.components[1]:bytewidth())
if component then
menu:click_on(component, nil, 1, 'l')
end
endThis is obviously a hack, it's not ideal because we still do the work of displaying the drop-down which could be avoided. |
Beta Was this translation helpful? Give feedback.
-
|
Good idea. I will provide a way to override the default |
Beta Was this translation helpful? Give feedback.
Implemented in commit b63fe2e