@Valurian said in How to disable cursor jumping to line start?:
When I click anywhere in a line the cursor is not currently in, and the beginning of the line is not currently visible, the window auto navigates to the start of the newly clicked line while also highlighting all the text between where I clicked and where the mouse pointer is hovering when this happens.
I think I understand what you described. Let’s say we have:
1 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua
3 Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat
4 Duis aute irure dolor in dolore eu fugiat nulla pariatur
5 Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
I made line 4 shorter than the usual lorem ipsum text. and added added a blank line at line 2. Copy/paste that into Notepad++ and resize the Notepad++ application so that is is narrow. Use the slider on the bottom of the Notepad++ window to scroll the window so that line 4, the short one, is no longer visible.
Click in the white area that is line 4. Notepad++ will position the text cursor or caret at the end of line 4 and will jump the window so that one pixel of the character at the end of line 4 along with the caret or text cursor are is visible. The text cursor or caret will be at the very left edge of the visible window, but it’s not at the start of the line.
Now click in the white area that is line 2, the empty one. Notepad++ will position the text cursor or caret at the end of line 2 and will jump the window so that the text cursor or caret is visible. As line 2 is empty we effectively jumped to the start of the lines.
@Michael-Mazur suggested Enable virtual space in the preferences which is a good way to prevent Notepad++ from placing the text cursor or caret at the end of a line when you click in the area past the end of a line. This also means the Notepad++ window will not be jumped so that the text cursor or caret becomes visible. Virtual space mode may cause some surprises if you start typing in the empty space past the end of a line as Notepad++ will then silently add tabs and or spaces to pad the lines o that the text you added past the end of the line is at the column you clicked. If the line is empty Notepad++ pads with tabs and then spaces if needed. If the line already has text then Notepad++ pads with spaces.
That all does not explain “while also highlighting all the text between where I clicked and where the mouse pointer is hovering when this happens” unless you have the shift key held down when you are clicking.