Skip to content
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

fix(api): Fix incorrect adjustment of visual mode marks #378

Merged
merged 2 commits into from
Jun 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions lua/legendary/toolbox.lua
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,7 @@ function M.get_marks()
local cursor = vim.api.nvim_win_get_cursor(0)
local cline, ccol = cursor[1], cursor[2]
local vline, vcol = vim.fn.line('v'), vim.fn.col('v')
if ccol > vcol then
local swap = vcol
vcol = ccol + 1
ccol = swap
end
return { cline, ccol, vline, vcol }
return { vline, vcol, cline, ccol + 1 }
end

---Set visual marks from a table in the format
Expand Down