mirror of
https://github.com/akinsho/toggleterm.nvim
synced 2024-09-16 21:34:03 +02:00
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:
parent
20ba30e26a
commit
75d3de9d26
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue