Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* 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
- Loading branch information