fix: cursor position after motion (#563)

nvim_win_set_cursor indexes  rowsfrom 1 but columns from 0, while we
seem to index columns from 1 as well.
This commit is contained in:
Raffaele Mancuso 2024-04-19 13:23:06 +02:00 committed by GitHub
parent 20ba30e26a
commit 75d3de9d26
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -250,7 +250,7 @@ function M.send_lines_to_terminal(selection_type, trim_spaces, cmd_data)
-- Jump back with the cursor where we were at the beginning of the selection
api.nvim_set_current_win(current_window)
api.nvim_win_set_cursor(current_window, { start_line, start_col })
api.nvim_win_set_cursor(current_window, { start_line, start_col-1 })
end
function M.toggle_command(args, count)