-
Notifications
You must be signed in to change notification settings - Fork 18
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(popup): support relative: cusror on vim #281
base: main
Are you sure you want to change the base?
fix(popup): support relative: cusror on vim #281
Conversation
Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
…handling Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested Vim's behavior with the script below and got a weird result.
script
set lines=100 columns=100
call append(0, [
\ '0123456789',
\ '0123456789',
\ '0123456789',
\ '0123456789',
\ '0123456789',
\ '0123456789',
\ '0123456789',
\ '0123456789',
\ '0123456789',
\ '0123456789',
\ ])
call cursor([5, 5])
echo popup_create('a', #{line: "cursor+3", col: "cursor+3"})->getwininfo()
echo getcurpos()
quitall!
shell command to run the above script
vim -V10 -u NONE -i NONE -N -n -e -s -S test.vim
result
Opening the X display failed
line 0: sourcing "test.vim"
[{'winnr': 0, 'variables': {}, 'botline': 1, 'height': 1, 'bufnr': 2, 'winbar': 0, 'width': 1, 'leftcol': 0, 'tabnr': 0, 'quickfix': 0, 'topline': 1, 'loclist': 0, 'wincol': 4, 'winrow': 4, 'textoff': 0, 'winid': 1001, 'terminal': 0}]
[0, 5, 5, 0, 5]
When I did the same thing in the cmdline, I got another result.
[{'winnr': 0, 'variables': {}, 'botline': 1, 'height': 1, 'bufnr': 2, 'winbar': 0, 'width': 1, 'lef
col': 0, 'tabnr': 0, 'quickfix': 0, 'topline': 1, 'loclist': 0, 'wincol': 8, 'winrow': 8, 'textoff't
0, 'winid': 1001, 'terminal': 0}] :
[0, 5, 5, 0, 5]
assertEquals(info.winrow, 7, "winrow should be 7"); | ||
assertEquals(info.wincol, 7, "wincol should be 7"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 7
comes from the nvim's test result.
This PR adds support for popup.open's relative option on vim.