Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#576 Unnecessary window grow when opening file

closed-fixed
Program (402)
9
2008-01-05
2007-01-05
Bert Wesarg
No

The NEdit window unnecessary grow, when a file is opened with a linenumber width that is less or equal the current gutter width, after a first resize was necessary.

To reproduce:

CVS from 2007-01-05, and set MIN_LINE_NUM_COLS to 3 (just to force the problem with small files), with show line numbers option enabled.

open file with < 1000 lines (source/calltips.c)
=> window size doesn't changed
open file with >= 1000 lines (source/macro.c)
=> window size changed by 1, only the gutter (now 4)
open file with < 1000 lines (source/linkdate.c)
=> window size changed by 1, but the gutter is still 4 width

Discussion

1 2 > >> (Page 1 of 2)
  • Thorsten Haude
    Thorsten Haude
    2007-01-05

    • assigned_to: nobody --> yooden
     
  • Thorsten Haude
    Thorsten Haude
    2007-01-05

    • priority: 5 --> 9
     
  • Thorsten Haude
    Thorsten Haude
    2007-01-05

    Logged In: YES
    user_id=119143
    Originator: NO

    Possibly a follow-up to SF#1055649.

     
  • Tony Balinski
    Tony Balinski
    2007-03-01

    Logged In: YES
    user_id=618141
    Originator: NO

    Sounds like [ 1588932 ] "line number not shown correctly" to me.

     
  • Bert Wesarg
    Bert Wesarg
    2007-05-20

    Logged In: YES
    user_id=122956
    Originator: YES

    more examples, this time with "Move Tab to ...":

    I)

    1. open in a new fresh nedit window a file with >10000 lines (so the gutter does change)
    2. open in a new fresh nedit window a file with <10000 lines (so the gutter don't change)
    3. use the "move tab to..." menu command to move the <10000 lines file to the >10000 lines window
    result: the line gutter for the <10000 lines file is still 4, not 5 as the line gutter for the >10000 lines tab
    even after switching tabs the gutter don't change

    II)

    1. open in a new fresh nedit window a file with <10000 lines (so the gutter don't change)
    2. open in a new fresh nedit window a file with >10000 lines (so the gutter does change)
    3. use the "move tab to..." menu command to move the >10000 lines file to the <10000 lines window
    result: the line gutter for the <10000 lines file is still 4, not 5 as the line gutter for the >10000 lines tab. but the window was not grown, so one column is missing from the >10000 lines tab

     
  • Bert Wesarg
    Bert Wesarg
    2007-05-20

    Logged In: YES
    user_id=122956
    Originator: YES

    ok, my last comment doesn't really fit to this bug report, but it should be the same problem.

    and ajbj, the line numbers are shown fine, only the automatic window/gutter wide setting is not correct or at least inconsistent.

     
  • Bert Wesarg
    Bert Wesarg
    2007-12-21

    Logged In: YES
    user_id=122956
    Originator: YES

    Finally, I had time to fix this annoying issue by myself. The fix changes the
    semantic slightly to the following:

    The window not only grow when more line columns are needed but also shrinks if
    fewer columns are needed.

    I must admit that this new behavior isn't really wanted by me, but makes the fix
    simple. But I think I can live with that.

    File Added: fix_line_gutter_bugs.diff

     
  • Bert Wesarg
    Bert Wesarg
    2007-12-21

    Logged In: YES
    user_id=122956
    Originator: YES

    Sorry there was a typo in the patch
    File Added: fix_line_gutter_bugs.diff

     
  • Bert Wesarg
    Bert Wesarg
    2007-12-22

    disable resizing patch

     
    Attachments
  • Bert Wesarg
    Bert Wesarg
    2007-12-22

    Logged In: YES
    user_id=122956
    Originator: YES

    This is a follow-up patch, which introduce an option to disable any window resizing originating from changes to the line gutter width.

    optione name: nedit.resizeWindow

    File Added: resize-opt.diff

     
1 2 > >> (Page 1 of 2)