-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
WIP: Add none border-lines style #3666
base: master
Are you sure you want to change the base?
Conversation
This is a no-op. Also please just use
This is not needed? It should be |
Oh?! Then this appears to be an older state of the PR, let me investigate. |
You can probably just wrap around by doing the loop like this:
But you will need to walk backwards (RB_PREV/RB_MAX) for |
OK, this kind of seems like it works, but there is one bug, firstly:
Then there is some odd stuff... The menu is too narrow by one character. Changing this from 2 to 3 fixes it, but I'm not sure why, it seems like
Also the height here seems like it should be |
Removing |
Thanks for your comments, @nicm, much appreciated as always. For today I will focus my attention to other work on my agenda and will get back to this as soon as I can. |
OK I think I have fixed it, it was most of the way there just a couple of minor errors and it was not taking the title into account everywhere. It is complicated because it is easy to make an error in one place but then accidentally correct it in another... Please try this: There are three cases which need to be handled:
So the width is the item width plus two spaces plus optionally two border lines. The height is the item width plus optionally two border lines or a line for the title. Then the item position similarly depends on if there is a border and a title. So everywhere we need to do this:
Meaning Then we can say: width is |
Does this look/work OK for you? |
🚧 This is a work-in-progress follow-up PR on #3650 that attempts to add the
none
border-lines style.@nicm: I assume there are off-by-one errors when calculating the width and height of the menu and I may have missed some code that does
+ 4
for the width or+ 2
for the height when figuring out the size and position of the menu.Maybe the changes in this PR so far help you identify other sections where changes are needed or issues with the code I've written.
I think it might be helpful to get another pair of eyes on this 👀
Test using
test_menu_border_lines_none.sh
padded
border-stylenone
with title: there seems to be one additional row at the very end of the menu and one additional column on the rightnone
without title: there seems to be two additional row at the very end of the menu and one additional column on the right