Open FlameTornado10 opened 4 months ago
This one is clearer. second_video.webm
Also, I check the code about mouse drag and figure out one way to handle this.
in the function on_drag
in nvim-cokeline/lua/cokerline/hover.lua,
change
if M.dragging() == current.bufnr or not M.dragging() then
M.set_dragging(current.bufnr)
return
end
-- dragged buffer
local dragged_buf = buffers.get_buffer(M.dragging())
to
if M.dragging() == current.bufnr or not M.dragging() then
M.set_dragging(vim.api.nvim_get_current_buf())
return
end
-- dragged buffer
local dragged_buf = buffers.get_buffer(vim.api.nvim_get_current_buf())
seems to eliminate this bug.
When first drag a random buffer, the reordering works fine. But after one successful reordering, if I choose to drag another buffer, the one that get reordered is not the one I choose latest, but the one that get reordered before. See as this file. Screen Recording - Made with FlexClip.webm