GNOME Bugzilla – Bug 687415
Line numbers not completely visible when using huge font
Last modified: 2013-09-03 18:46:12 UTC
Created attachment 227875 [details] Screenshot demonstrating the problem The line numbers are not completely visible.
I'm seeing this problem on 3.6.1 (Ubuntu 12.10) as well. On some files, although reloading a file seemed to clear it up once, the line number gutter (or whatever it's called) isn't sized correctly and the numbers get truncated.
*** Bug 675348 has been marked as a duplicate of this bug. ***
*** Bug 687517 has been marked as a duplicate of this bug. ***
The bug I'd added this data to was closed as duplicate, so I guess I'll migrate my comments here. (Also reported as redhat bugzilla #991735...) Description of problem: When the font size is increased in gedit (either interactively or in the preferences), the line numbering size is increased to match. However, the line-number strip width remains constant, so at larger font sizes the line numbering becomes cut off. Steps to Reproduce: 1. Open a file in gedit 2. Enable "Display line numbers" in Preferences > View, if necessary 3. Increase font size significantly, either in Preferences or (if "Text Size" plugin is enabled) by repeatedly pressing Ctrl and + Actual results: Line numbers grow larger, and are increasingly cut off by the window border. Expected results: Line number strip dynamically resizes to fit width of its contents. Additional info: The wrong-size line numbering strip (which happens in both directions; if the font is decreased it remains far too wide) occurs on a per-tab basis when multiple files are open, and persists in each tab until a resize of the strip occurs. Such a resize can be triggered (for the current tab only) by increasing or decreasing the line count in the open file by an order of magnitude (e.g. from 995 to 1001 lines). Note that the nominal width of the strip is 2 digits, so the shortest length transition that will cause a resize is from 99 to 100 lines, or vice versa.
Created attachment 254002 [details] [review] GutterRendererLines: recalculate size on view style updated This fixes a bug with the line numbers, when we change the font size of the text view (the gutter width was not updated).
Review of attachment 254002 [details] [review]: Looks good.
Commit pushed. It will be available for the 3.10 version.