-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Crash when pane/(v)split widthe is smaller than ruler size #3052
Comments
Hm, strange. I can't reproduce this. |
Ok. I just tried with gnome terminal with the same result. And I understood my mistake in describing the issue. Did you tried to move the divider line to both sides? It won't crash if you will try to hide the split pane without ruler even when another split pane has it |
I'm at a Debian testing with gnome console (kgx), opened an empty |
When you said backtrace you meant this?
I tried to understand where it is but it was just in front of me |
Ok. I just tried to open with empty micro because didn't do it earlier. Opened empty micro, vsplit, but crash |
Let me guess, you've |
Yeah they are active. You are right I just disabled them and they work |
When we resize a split pane to a very small width, so that the gutter does not fit in the pane, it overwrites the sibling split pane. To fix it, clean up the calculation of gutter width, buffer width and scrollbar width, so that they add up exactly to the window width, and ensure that we don't draw the gutter beyond this calculated gutter width (gutterOffset). As a bonus, this also fixes the crash zyedidia#3052 (observed when resizing a split pane to a very small width, if wordwrap is enabled), by ensuring that bufWidth is never negative. [*] By the gutter we mean of course gutter + diffgutter + ruler.
When we resize a split pane to a very small width, so that the gutter does not fit in the pane, it overwrites the sibling split pane. To fix it, clean up the calculation of gutter width, buffer width and scrollbar width, so that they add up exactly to the window width, and ensure that we don't draw the gutter beyond this calculated gutter width (gutterOffset). As a bonus, this also fixes the crash zyedidia#3052 (observed when resizing a split pane to a very small width, if wordwrap is enabled), by ensuring that bufWidth is never negative. [*] By the gutter we mean of course gutter + diffgutter + ruler.
* Fix gutter overwriting other split pane When we resize a split pane to a very small width, so that the gutter does not fit in the pane, it overwrites the sibling split pane. To fix it, clean up the calculation of gutter width, buffer width and scrollbar width, so that they add up exactly to the window width, and ensure that we don't draw the gutter beyond this calculated gutter width (gutterOffset). As a bonus, this also fixes the crash #3052 (observed when resizing a split pane to a very small width, if wordwrap is enabled), by ensuring that bufWidth is never negative. [*] By the gutter we mean of course gutter + diffgutter + ruler. * Don't display line numbers if buffer width is 0 and softwrap is on If softwrap is enabled, the line numbers displayed in the ruler depend on the heights of the displayed softwrapped lines, which depend on the width of the displayed buffer. If this width is 0 (e.g. after resizing buffer pane to a very small width), there is no displayed text at all, so line numbers don't make sense. So don't display line numbers in this case. * Fix buffer text overwriting scrollbar when window width is 1 char
Description of the problem or steps to reproduce
When width of the pane is smaller than it is ruler size it crashes. If the pane doesn't have the ruler everything works good
Specifications
Commit hash: v2.0.13 68d88b5
OS: Debian 12
Terminal: foot
The text was updated successfully, but these errors were encountered: