-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] SMART Cursor Movement (ala TextPad) #9039
Comments
The only issue I have with your "issue" is calling it "SMART" in the title. :-) Most people seem to wish to have the opposite behavior when the your desired behavior is noticed to have occurred. The problem is, there seems to be a good way of NOT doing it, when it is noticed to be occurring, by inserting a call to SCI_CHOOSECARETX. |
@sasumner : yeah, maybe "smart" was too personal :). |
I was just pointing out that calling the function I referenced is a cure for the opposite situation (when you move your caret vertically and it "jumps" horizontally). I know of no way to handle the opposite situation, but maybe someone else has a suggestion? Anyway, YOU (as a user) can't use that function (or a similar one that does the opposite behavior), but a N++ coder can call these type of functions to achieve a goal, at the right place in the source code. |
Got it, thanks. Hope someone has a suggestion on how to make it possible. |
Description of the Issue
Feature Request
Steps to Reproduce the Issue / Expected Behaviour
I'm starting now to use Notepad++ after many years of usage of Textpad. The only missing thing I found is what was described by @TroglodyteGuy on Issue #2906. This issue has been marked as closed but actually is still ongoing.
I'm referring to this behaviour:
For example, say I have the following two lines, with the cursor positioned at the pipe:
...and then I typed "brown", the cursor would end up here:
...in most editors (including Notepad++), if I then pressed the down arrow, I'd wind up with this:
However, TextPad ends up with this:
It seems the editor is keeping track of both the cursor's "current X position" and the "base X position", which is "the original X position before any editing occurred since the last horizontal cursor navigation command". Then, if you move the cursor up or down (with either up/down arrows, or pgup/pgdn), the cursor tries to keep as close to the original X position as possible, but within the current line's constraints. The base X position is updated next time you manually position the cursor horizontally (e.g. left/right arrows, mouse click, etc).
This particular movement of the caret is very useful when trying to insert different text over the lines.
It would be great to add this behaviour as an option.
The text was updated successfully, but these errors were encountered: