Menu

#2231 Cursor navigation issue in word wrap mode

Bug
closed-fixed
nobody
5
2021-03-09
2021-01-31
cshnik
No

The issue appeared both in Scintilla 3.x/4.x (tested with latest 4.4.6)
Steps to reproduce:

  1. Run SctiTE, select File-> Encoding-> UTF8, select Options-> Wrap
  2. Enter the long line of characters (eg 1), create second line by pasting the following chars: 日本
  3. Resize window to wrap lines as shown on the attached image
  4. Move cursor to wrapped line start, press Alt+End, cursor get moved to last character on line
  5. Press Alt+Home to return cursor back, press Down to switch to the following line
  6. Repeat steps 4-5

Actual result: cursor moved to the following line (on Alt+End keypress) for lines with hieroglyphs
Expected result: cursor moved to the last character on line

Please consider the following fix:
https://github.com/ProgerXP/Notepad2e/commit/73ef6af219f840e64dd228ad3d7b0e724536277f

1 Attachments

Discussion

  • Neil Hodgson

    Neil Hodgson - 2021-02-01
    • labels: word wrap, cursor, line ending --> word wrap, cursor, line ending, scintilla, win32
    • status: open --> open-works-for-me
     
  • Neil Hodgson

    Neil Hodgson - 2021-02-01

    While the proposed patch appears reasonable, I can't reproduce this bug. You should attach the file you are using and specify any non-standard settings. The image shows larger than normal characters so it appears you have changed the system scale factor.

     
  • cshnik

    cshnik - 2021-02-01

    Specified behavior is also reproduced with 100% scaling factor.
    Please do the following:

    1. Run Sc446.exe (www.scintilla.org)
    2. Open SciTest.txt (raw.githubusercontent.com)
    3. Select Main Menu-> File-> Encoding-> UTF-8
    4. Select Main Menu-> Options-> Wrap
    5. Press Alt+End, note behavior
     

    Last edit: cshnik 2021-02-01
  • Neil Hodgson

    Neil Hodgson - 2021-02-01
    • status: open-works-for-me --> open-accepted
     
  • Neil Hodgson

    Neil Hodgson - 2021-02-01

    How do I extract that change as a .patch file?

     
  • Neil Hodgson

    Neil Hodgson - 2021-02-02
    • status: open-accepted --> open-fixed
     
  • Neil Hodgson

    Neil Hodgson - 2021-02-02

    Committed as [b8c51a] .

    Documentation credits this to "cshnik". If you want a different name then specify it here.

     

    Related

    Commit: [b8c51a]

  • Neil Hodgson

    Neil Hodgson - 2021-03-09
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB