#4014 SHIFT+HOME/END behaves incorrectly when wordrwap is enabled

open
nobody
None
5
2014-07-07
2012-10-12
Anonymous
No

Notepad++ v.6.2 (and all previous ones I've used)
Windows Vista, Windows 7

Expected behavior:

When wordwrap is on, causing a single line of text to wrap across several on-screen lines, holding SHIFT and pressing HOME or END should move the cursor to the beginning or end of the current on-screen line (not the terminating ends) -- just like when SHIFT is NOT pressed -- thus selecting from the cursor's original position to the beginning or end of the current on-screen line.

Actual, unexpected behavior:

When wordwrap is on, causing a single line of text to wrap across several on-screen lines, holding SHIFT and pressing HOME or END unexpected moves the cursor to the beginning or end of the wrapped line, unexpectedly selecting more text than what was desired.

Discussion


  • Anonymous
    2012-10-12

    Behavior demonstration

     
    Attachments
  • JonL
    JonL
    2014-03-26

    I know this is an old thread, but I had the same issue with np++ and found a workaround thanks to this thread: http://sourceforge.net/p/notepad-plus/discussion/331753/thread/ba6c9aa6
    To get your intended behavior,
    1) go to Settings -> Shortcut mapper -> Scintilla commands,
    2) search for the bindings for Shift+Home and Shift+End. Most likely, they are set to SCI_VCHOMEEXTEND for Shift+Home and SCI_LINEENDEXTEND for Shift+End (respectively lines 59 and 64)
    3) Delete these two shortcuts: click on the line, "Modify", then select "None" in the drop-down menu for the shortcut key, and "Apply", "OK".
    4) Set Shift+Home as shortcut to SCI_VCHOMEWRAPEXTEND and Shift+End as shortcut to SCI_LINEENDWRAPEXTEND (lines 62 and 69). To do that, again click on the line, "Modify", set the right key combination and "Apply", "OK".

    That did the trick for me.

     
  • I was just about to file this bug myself ;-)

    So I can only confirm the bug, and the workaround.

    Please fix this! It's inconsistent and therefore annoying.

    Cheers,
    Thomas