notepad-plus-plus / notepad-plus-plus/notepad-plus-plus
[Feature Req.] Add X and Y caret policy user configurability
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 29.4k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
It would be a nice feature for Notepad++ users to be able to set the X and Y caret policy provided by Scintilla.
This would provide an edge-of-viewport buffer region, improving data visualization.
As it is currently (N++ 8.4.4), sometimes caret navigation operations (e.g. pressing the End key) will leave the user with the caret at the righthand window edge. This does not allow the user to see the anything to the right of the caret (e.g. visible line-endings), without horizontally scrolling (an additional operation).
If a caret policy could be set, the user could adjust this to their general need, and a certain number of characters would be forced to be visible on the right of the viewport after the caret location.
The above is just an example for the right-edge of the editing window. Similar "problems" currently exist for the left edge, and top and bottom edges as well.
This was first mentioned HERE and was upvoted by @donho.
It came up again recently in #11979.
The UI for the Preferences > Editing screen needed are:
X slop:, in characters (default: 0)Y slop:, in lines (default: 0)
Note: The controls for the UI could be sliders with fixed limits (not sure what the limit should be) or, perhaps less desirable, integer input boxes.
Note: using a default of 0 would preserve existing Notepad++ functionality. Only users that need the improved functionality would need to go into the Preferences and make a change.
The needed Scintilla functions are shown HERE in the docs.
The suggestion for keeping it simple for the user is to call Scintilla function with the STRICT, EVEN, and SLOP flags.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in Preferences > Editing and review how existing editing settings are represented and applied to the Scintilla editor. Consult the linked Scintilla SCI_SETXCARETPOLICY documentation and its related Y policy API; done means configurable X and Y slop settings with defaults of 0 and the requested policy behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100