-
-
Notifications
You must be signed in to change notification settings - Fork 853
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
strange cursor move when telescope closes #2319
Comments
This is weird. The problem seems to be when calling pcall(a.nvim_win_set_cursor, original_win_id, { original_cursor[1], original_cursor[2] + 1 }) If I would wrap it in The following line in local cursor_valid, original_cursor = pcall(a.nvim_win_get_cursor, original_win_id) I printed the position to the screen and it seems to be correct in both cases. The problem as far as I can tell seems to be with |
If in pcall(a.nvim_win_set_cursor, original_win_id, { original_cursor[1], original_cursor[2] + 1}) with vim.defer_fn(function()
pcall(a.nvim_win_set_cursor, original_win_id, { original_cursor[1], original_cursor[2] })
end, 0) The |
I can confirm that will fix this issue. |
needs to be reverted in #2538 because it broke custom actions that rely that the picker is actually closed with |
@Conni2461 is there a plan to re-fix this issue? |
This column off by one error also happens when opening files in normal mode. |
Description
When telescope closes, the cursor will strangely move right by 1 column. That will influence some other plugins like https://github.com/AckslD/nvim-neoclip.lua . Neoclip uses telescope to provide a selection of yank history, and paste the selected item where it launched. This strange move makes neoclip paste to a wrong position.(AckslD/nvim-neoclip.lua#96).
Also, if you launch
require('telescope.builtin').help_tag
, choose one and close the help window, the cursor will move right.Neovim version
Operating system and version
archlinux
Telescope version / branch / rev
master
checkhealth telescope
Steps to reproduce
Expected behavior
No response
Actual behavior
described above
Minimal config
The text was updated successfully, but these errors were encountered: