Skip to content

Commit

Permalink
fix(menu): convert mouse.column to 0-based
Browse files Browse the repository at this point in the history
  • Loading branch information
bekaboo committed Jun 4, 2023
1 parent 54c1dba commit 04e04cc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ https://github.com/Bekaboo/dropbar.nvim/assets/76579810/e8c1ac26-0321-4762-9975-
if mouse.winid ~= menu.win then
return
end
menu:update_hover_hl({ mouse.line, mouse.column })
menu:update_hover_hl({ mouse.line, mouse.column - 1 })
end,
},
---@alias dropbar_menu_win_config_opts_t any|fun(menu: dropbar_menu_t):any
Expand Down Expand Up @@ -764,7 +764,7 @@ menu:
if mouse.winid ~= menu.win then
return
end
menu:update_hover_hl({ mouse.line, mouse.column })
menu:update_hover_hl({ mouse.line, mouse.column - 1 })
end,
}
```
Expand Down
2 changes: 1 addition & 1 deletion doc/dropbar.txt
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ the menu:
if mouse.winid ~= menu.win then
return
end
menu:update_hover_hl({ mouse.line, mouse.column })
menu:update_hover_hl({ mouse.line, mouse.column - 1 })
end,
}
<
Expand Down
2 changes: 1 addition & 1 deletion lua/dropbar/configs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ M.opts = {
if mouse.winid ~= menu.win then
return
end
menu:update_hover_hl({ mouse.line, mouse.column })
menu:update_hover_hl({ mouse.line, mouse.column - 1 })
end,
},
---@alias dropbar_menu_win_config_opts_t any|fun(menu: dropbar_menu_t):any
Expand Down

0 comments on commit 04e04cc

Please sign in to comment.