-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Rearrange buffers with mouse drag #113
Conversation
Makes use of neovim/neovim#23947
Depends on neovim/neovim##23947
Problem: dragging was glitchy because buffers were sized differently. Solution: ensure mouse will still be in the dragged buffer before actually moving it.
Hey, I think this commit causes issues when you're not using neovim nightly 😅 Maybe it should be wrapped with a check on vim.keycode? local drag = {}
local mouse_move
if vim.keycode then
mouse_move = vim.keycode("<MouseMove>")
drag = {
[vim.keycode("<LeftDrag>")] = "l",
[vim.keycode("<RightDrag>")] = "r",
[vim.keycode("<MiddleDrag>")] = "m",
}
end Or maybe other solution, but right now it is throwing some errors when opening neovim not nightly |
Thanks! I checked for on_key but forgot to add a check for keycode. Will push a fix now. |
No description provided.