-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
screenpos()
returns wrong result for some windows / tabs.
#19606
Comments
related: #19020 @echasnovski may have insight. |
My guess is that it has something to do with legacy
|
As far as I can tell there is no difference if i use Also, another thing that is affected when bug happens is I've also noticed that updating wrap in window helps even if its not changed: |
@justinmk, other than that, I don't think these issues are related. |
If it's any help at all I noticed it is only happening when I'm using vertical splits. Never happens without split being created first. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Closing because nothing can be done without steps to reproduce. |
Neovim version (nvim -v)
NVIM v0.8.0-dev-nightly-2-gd529523027
Vim (not Nvim) behaves the same?
Not sure, it happens randomly and I notice it only when using
nvim-cmp
Operating system/version
Linux / Arch Linux
Terminal name/version
alacritty 0.10.1
$TERM environment variable
xterm-256color
Installation
AUR / neovim-git
How to reproduce the issue
Happens randomly, was not able to reproduce it on demand yet, if I figure this out I will update isuue.
Expected behavior
screenpos()
to always return correct position.Actual behavior
When using
screenpos()
sometimes result is wrong:I've created a helper binding to test it:
When I use
<c-s>
it sometimes returns this wrong data set. When it gets broken, it is broken for every window in given tab, if I open split, change buffer it is all broken. Same file in different tab will work all right.I've also noticed that when I use
:set nowrap
it gets fixed and works with no issues (even when follow with:set wrap
it still works till it gets broken again).By default I have
wrap
enabled.This affects
nvim-cmp
for me. When function doesn't work the completion window is rendered in left top corner no matter what my position in the window is.In example below on both tabs I'm on the line 10 and using my helper mapping
<c-s>
:Correct result:
![screenshot_from_2022-08-01_11-46-25](https://user-images.githubusercontent.com/1702152/182123551-7dfed7ec-22ab-4410-a1d7-4fe9b729e5bb.png)
Wrong result:
![screenshot_from_2022-08-01_11-46-34](https://user-images.githubusercontent.com/1702152/182123555-3994ef99-0a7d-4799-a051-5ca412649f3b.png)
The text was updated successfully, but these errors were encountered: