#689 Turning Word-wrap off doesn't update screen position

Bug
open-wont-fix
Neil Hodgson
Scintilla (790)
4
2008-06-15
2008-06-11
Eric Promislow
No

This happens on Windows only

I load a large XML file into Scite -- about 2/3 of the
lines are folded when I enter word-wrap. The
file is part of the openkomodo installation code --
it's under MPL/GPL/LGPL, so no problem attaching it.

Move to line 1870 (out of 5273)

Turn off word-wrap.

The top-line in the buffer is now line 2947, but the
cursor is at line 1870, as before.

Editor::ReconfigureScrollBars() is a stub, which is
implemented for Mac and GTK, but not Windows.

I tried to do this manually in Komodo, and found that
the screen coordinates aren't updated until the routine
stops running, and Scintilla gets a chance to
sync itself. Looks like it's the same problem.

Discussion

  • Neil Hodgson
    Neil Hodgson
    2008-06-15

    • priority: 5 --> 4
    • assigned_to: nobody --> nyamatongwe
    • status: open --> open-wont-fix
     
  • Neil Hodgson
    Neil Hodgson
    2008-06-15

    Logged In: YES
    user_id=12579
    Originator: NO

    Editor::ReconfigureScrollBars() is for changing the scroll bars to suit the settings (such as hiding the horizontal scroll bar when turning on wrap) rather than to change the scrolled position.

    Wrapping is an asynchronous operation which may take some time over multiple partial wrap operations. You can't set the desired scroll position at the beginning since you don't know (at least when turning wrapping on) where that will be until the wrap has passed that position. You could remember [when wrap complete: scroll to show same top line] but the user may have scrolled while the wrap is progressing and would be annoyed to then have that overridden. There's also the issue of whether to keep the same top line or to strike some balance between the top line and the caret, with the caret kept in view if it is already visible.

    If you want to implement something cleverer in some circumstances then it can probably go in although if there are potential problems then that may need to be optional.