Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#1486 (2.6.6.0) wrap lines looses horizontal scroll bar

Branch_+_Trunk
open
Gal Hammer
GUI (515)
5
2007-05-12
2007-04-24
Steve Brereton
No

Switching 'view > wrap lines' on, when the horizontal scrollbar(s) are at a mid-point (i.e. looking half-way across the (long) lines being compared, the scroll bars vanish (obviously), but the left/right view panes are then stuck where they were - they aren't returned to the left end of the lines and there is no way to get the panes back to the left side

attached image to show what I mean
top half is 'no wrapping' bottom half is with wrapping

Discussion

  • Steve Brereton
    Steve Brereton
    2007-04-24

    showing winmerge screen

     
    Attachments
  • Gal Hammer
    Gal Hammer
    2007-04-25

    Logged In: YES
    user_id=411238
    Originator: NO

    I see what you mean. I guess we need to place the cursor at start (or end) of current line.

     
  • Gal Hammer
    Gal Hammer
    2007-04-25

    Logged In: YES
    user_id=411238
    Originator: NO

    The following patch fixed the problem. However we still have problems when switching to and from word-wrap mode.

    --- 8< ---

    *** /Temp/ccrystaltextview.cpp-revBASE.svn001.tmp.cpp Wed Apr 25 09:11:50 2007
    --- /Src/editlib/ccrystaltextview.cpp Wed Apr 25 09:11:39 2007
    ***************
    *** 3253,3267 ****
    SCROLLINFO si = {0};
    si.cbSize = sizeof (si);

    if (m_bWordWrap)
    {
    // Disable horizontal scroll bar
    si.fMask = SIF_DISABLENOSCROLL | SIF_PAGE | SIF_POS | SIF_RANGE;
    SetScrollInfo (SB_HORZ, &si);
    return;
    }

    - const int nScreenChars = GetScreenChars();
    const int nMaxLineLen = GetMaxLineLength ();

    if (bPositionOnly)
    --- 3253,3274 ----
    SCROLLINFO si = {0};
    si.cbSize = sizeof (si);

    + const int nScreenChars = GetScreenChars();
    +
    if (m_bWordWrap)
    {
    + if (m_nOffsetChar > nScreenChars)
    + {
    + m_nOffsetChar = 0;
    + UpdateCaret ();
    + }
    +
    // Disable horizontal scroll bar
    si.fMask = SIF_DISABLENOSCROLL | SIF_PAGE | SIF_POS | SIF_RANGE;
    SetScrollInfo (SB_HORZ, &si);
    return;
    }

    const int nMaxLineLen = GetMaxLineLength ();

    if (bPositionOnly)

    --- >8 ---

     
  • Kimmo Varis
    Kimmo Varis
    2007-04-25

    Logged In: YES
    user_id=631874
    Originator: NO

    Patch looks good.

     
  • Gal Hammer
    Gal Hammer
    2007-04-26

    Logged In: YES
    user_id=411238
    Originator: NO

    Committed to SVN. Completed: At revision: 4263.

    What about R2_6? Do we want to back-port this change and others which are related? I know you prefer not to touch this branch, but I think we have too many visible bugs that should not be ignored.

     
  • Kimmo Varis
    Kimmo Varis
    2007-04-26

    Logged In: YES
    user_id=631874
    Originator: NO

    Well, we've now getting some interesting bug reports about 2.6.6 (did 2.6.6 hit to some big download site previous 2.6.x releases didn't?) so maybe it makes sense to have one more 2.6.x release.

    So, please apply to 2.6. But first, lets have at least one experimental from trunk.

     
  • Kimmo Varis
    Kimmo Varis
    2007-04-26

    • assigned_to: nobody --> galh
     
  • Kimmo Varis
    Kimmo Varis
    2007-05-12

    • milestone: --> Branch_+_Trunk
     
  • Kimmo Varis
    Kimmo Varis
    2007-05-12

    Logged In: YES
    user_id=631874
    Originator: NO

    Damn. I've just haven't had a time for experimental. Now that it looks like we don't target to fast 2.8 release I think I can arrange some time next week for experimental release. However, I'd like that experimental to have linediffs problem for whitespaces fixed? Is that possible?

     
  • Gal Hammer
    Gal Hammer
    2007-05-13

    Logged In: YES
    user_id=411238
    Originator: NO

    > However, I'd like that experimental to have linediffs
    > problem for whitespaces fixed?

    I'll do my best to have this patch ready ASAP.

     
  • Kimmo Varis
    Kimmo Varis
    2007-05-21

    Logged In: YES
    user_id=631874
    Originator: NO

    Hmm? I still can reproduce this bug in 2.7.3.4? Just by opening two files with long lines, scrolling vertically and switching word wrap on?

     
  • Steve Brereton
    Steve Brereton
    2007-05-21

    Logged In: YES
    user_id=1224915
    Originator: YES

    Where do I find 2.7.3.4?

     
  • Gal Hammer
    Gal Hammer
    2007-05-21

    Logged In: YES
    user_id=411238
    Originator: NO

    Kimmov, are you asking a question or reporting a problem? :-)

    I didn't test 2.7.3.4 release, but I'm unable to reproduce it with my trunk version.

     
  • Kimmo Varis
    Kimmo Varis
    2007-05-21

    Logged In: YES
    user_id=631874
    Originator: NO

    2.7.3.4 is the latest experimental release in downloads.

    Yes, I'm reporting that for me the problem exist in latest release which has the fix. Attached a configuration log.
    File Added: WinMerge.txt

     
  • Kimmo Varis
    Kimmo Varis
    2007-05-21

    Configuration log from Kimmo

     
    Attachments
  • Kimmo Varis
    Kimmo Varis
    2007-05-21

    Logged In: YES
    user_id=631874
    Originator: NO

    For some reason view is not updated properly. Caret is moved to begin of the line, but view still shows wrong area, it is not updated to new linelengths and view area.

     
  • Gal Hammer
    Gal Hammer
    2007-05-21

    Logged In: YES
    user_id=411238
    Originator: NO

    Are you sure there is a problem with the caret position? I agree that there might be a problem with the visible area location, but as far as I can tell the caret stay at the same location (and you might need to find it).

     
  • Kimmo Varis
    Kimmo Varis
    2007-05-21

    Logged In: YES
    user_id=631874
    Originator: NO

    No, I think caret is moved correctly (as it is not shown in wrong view area at all). But view is not moved to correct position. The situation I see is like in original submitter's screenshot.

    What I do is:
    # have files with long lines
    1) open those files to WinMerge file compare, with word-wrap disabled
    2) scroll files downwards few lines so that long lines are clearly visible in views (though this step shouldn't be needed for reproducing the bug)
    3) scroll views to right so that I see the last characters of long lines. I scroll using keyboard so that caret is at the end of the long line
    4) from menu enable word-wrap

    Expected: views are scrolled to begin of the lines, first characters visible, and word-wrapped

    Actual: empty views, as view shows the old position, where end of lines were before enabling word-wrap. I have no way to scroll views to begin of lines.

     
  • Gal Hammer
    Gal Hammer
    2007-05-21

    Logged In: YES
    user_id=411238
    Originator: NO

    I'll try to run this scenario and see if I can reproduce this. Maybe I didn't scroll to the end of the line.