-
Notifications
You must be signed in to change notification settings - Fork 32
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
Input windows covers the current line when using NW anchor #106
Comments
This was left over from before we had the "override" function. Now, it doesn't make much sense to set the anchor as an option because so much of the rest of the layout logic depends on the anchor being the default. If a user wants to customize the layout, the override function is the way to do it.
Honestly, the anchor should not even be a config option anymore. It's left over from a time when there were more ways to configure the |
@ehaynes99 you can set the anchor in the override function like so: override = function(conf)
conf.anchor = "NW"
conf.row = 1
end |
Describe the bug
vim.ui.input
window (e.g. for LSP rename) covers the cursor / current line when configuringinput.anchor = "NW"
.System information
Screenshots
![image](https://private-user-images.githubusercontent.com/1024891/255050231-2d59f989-dc3d-4e74-9597-aadf13b34294.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgwMjU0OTMsIm5iZiI6MTcxODAyNTE5MywicGF0aCI6Ii8xMDI0ODkxLzI1NTA1MDIzMS0yZDU5Zjk4OS1kYzNkLTRlNzQtOTU5Ny1hYWRmMTNiMzQyOTQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MTBUMTMxMzEzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZWY3ZWQ1NGZkMGYzOGE0NGEyNWZhNTZiOTQyNTQ0Y2IwMGQ5YjA1MWZkYzRhYTU5MWUwY2NhODFhZmFlZmJlNSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.o7mrogmFYxM7_T-GikojTQF0VNTBbGY0Kt0sLVdpaAA)
![image](https://private-user-images.githubusercontent.com/1024891/255050283-3758bdc5-ffae-4fb4-8ca7-852dd3e7bdc6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgwMjU0OTMsIm5iZiI6MTcxODAyNTE5MywicGF0aCI6Ii8xMDI0ODkxLzI1NTA1MDI4My0zNzU4YmRjNS1mZmFlLTRmYjQtOGNhNy04NTJkZDNlN2JkYzYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MTBUMTMxMzEzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NTEwNjM2NTAzZGZlNjA4ZmQyYzcwMzUyZTZhZmVkOTA2ZGVkNDc0NWM0MDc4OGViYzBjN2E5MGM4YzhhNTNjZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.Kr70WfjqgyJvukHFSe_zz-ZzCBTEGvqiQMxkPRphVe4)
Additional context
From
:help nvim_open_win
:In input.lua,
row
is set, so therow=1
offset is lost:dressing.nvim/lua/dressing/input.lua
Line 249 in 3961185
Possible fixes include:
bufpos
instead ofrow
/col
(this seems to be the intended way to position a window relative to buffer text)row
/col
when usingrelative="cursor"
calculate_row
to check theanchor
. I did that before fully understanding the alternatives (I'll open a PR).The text was updated successfully, but these errors were encountered: