-
-
Notifications
You must be signed in to change notification settings - Fork 836
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: correctly restore cursor position in original window #2336
fix: correctly restore cursor position in original window #2336
Conversation
This attempt at a fix introduces another bug. With |
The thing that I find always works is to ensure that you always are in normal |
thanks for the PR :) i am super nervous at touching any of that code, its always really flaky and i dont know why. something always breaks ^^ but can you fix stylua ci and i ran this for a day or two and see how it works thanks :) also sorry for the late response. |
a413400
to
ceeb068
Compare
me irl ... so sad. yeah so obviously i haven't ran this for a day or two. i am going to test it now and then maybe merge, we'll see (hopefully earlier than 3 months) |
thanks again :) |
(cherry picked from commit 3f1b579)
needs to be reverted because it breaks custom actions that rely that the windows are closed after |
)" This reverts commit 3f1b579.
Description
In some conditions such as when calling
man_pages
orhelp_tags
the cursorposition in the original window is wrongly restored. This bug was introduced by
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 and seems to be caused by some weird
"race condition".
Fixes #2319
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list relevant details about your configuration
man_pages
andhelp_tags
move the cursor tothe right when you hit Enter. With this change this doesn't happen. The commit
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 that introduced this bug tried to fix
the fact that when you leave Telesope with from insert mode the cursor is
moved to the left by 1 position. But this made it so that under some circumstances
the opposite happens, that is for the cursor to be moved to the right. This
might have something to do with the Vim loop.
vim.api.nvim_put
on selection works correctly before and after the cursorChecklist: