ProgerXP / Notepad2e

Word highlighting, simultaneous editing, split views, math evaluation, un/grep, comment reformatting, UAC elevation, complete regexps (PCRE), Lua lexers, DPI awareness and more (XP+)
Other
372 stars 52 forks source link

Add View > First Column Margin #382

Open ProgerXP opened 2 years ago

ProgerXP commented 2 years ago

Two tasks are frequent: moving to the last column (or selecting from it) and the same with the first column. However, last column is easily accessible (since the area after line end is interactive) while first column is not.

Add a new command below View > Selection Margin: First &Column Margin (hotkey Ctrl+Alt+Shift+M) and create an area (on the right of Selection Margin's area) to support all interaction types allowed in the main text area, but on the first column.

(The mouse cursor is "|". Single click on moves caret to before the first symbol on that line. Dragging from it first moves the caret and then selects text, making it really simple to select part of the line's start without pixel-hunting. Double click selects the first word. Etc.)

Instead of reimplementing the usual Scintilla interaction for this Margin, it's better to add a non-editable padding on the left of the text area (that is inside the text area) and just change its background color to match the Line Margin's.