fix(clipboard): set cursor to new line (#335)
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
parent
2e48174d09
commit
d622feedfa
@ -21,6 +21,11 @@ if Config.support_paste_image() then
|
||||
if not ok then
|
||||
return overriden(lines, phase)
|
||||
end
|
||||
|
||||
-- After pasting, insert a new line and set cursor to this line
|
||||
vim.api.nvim_buf_set_lines(bufnr, -1, -1, false, { "" })
|
||||
local last_line = vim.api.nvim_buf_line_count(bufnr)
|
||||
vim.api.nvim_win_set_cursor(0, { last_line, 0 })
|
||||
end
|
||||
end)(vim.paste)
|
||||
end
|
||||
|
@ -1273,8 +1273,6 @@ function Sidebar:create_input()
|
||||
api.nvim_win_set_hl_ns(hint_window, Highlights.hint_ns)
|
||||
end
|
||||
|
||||
show_hint()
|
||||
|
||||
api.nvim_create_autocmd({ "TextChanged", "TextChangedI" }, {
|
||||
group = self.augroup,
|
||||
buffer = self.input.bufnr,
|
||||
|
Loading…
x
Reference in New Issue
Block a user