You are here: PSPad forum > English discussion forum > Move cursor word right inconsistent behavior
Posted by: Bram | Date: 2025-10-10 19:53 | IP: IP Logged
I am not sure if this is a bug or a feature but:
[1] If the line ends on whitespace + > 1 char, and i press ctlr + right arrow to navigate in that line, then when he has arrived at the position right before the char combination, the next jump will be to the end of the current line -> OK
[2] However if I have a line ending on a whitespace + single char, when he has arrived at the position right before that last char and I press ctlr + right arrow again he jumps to the start of the next line -> NOK (imho)
I recently started using pspad, and I constantly use the ctrl + right arrow to navigate to the end of my lines to continue typing on them, so this does not work very well in pspad. So far all other editors I use have consistent type [1] behavior no matter how many chars are in the last 'word'.
I already found another thread discussing the next word behavior for a different reason (https://forum.pspad.com/read.php?4,79337,79340#msg-79340) , I installed the ingkcpos script mentioned there in the hopes it would change the behavior but sadly it does not.
So is the current pspad behavior or bug or a feature ?
If it is a feature can I change the behavior via scripting ? (in which case I will take a look into pspad scripting).
Edited 1 time(s). Last edit at 2025-10-10 19:55 by Bram.
Posted by: vbr | Date: 2025-10-11 21:05 | IP: IP Logged
Bram:...
[1] If the line ends on whitespace + > 1 char, and i press ctlr + right arrow to navigate in that line, then when he has arrived at the position right before the char combination, the next jump will be to the end of the current line -> OK
...
So is the current pspad behavior or bug or a feature ?
If it is a feature can I change the behavior via scripting ? (in which case I will take a look into pspad scripting).
Hi,
I can confirm this behaviour, single character words before the end of line seem to be skipped somehow (with and without scripting active).
I think, this should be fixed internally (maybe some pattern for word or word-boundary needs to be tweaked?).
In case, you are interested in scripting, this functionality can certainly be achieved that way. You can tweak the mentioned ingkpos or another script or write an own implementation.
I also attempted to code a customisable cursor movement in my ancient script, which haven't been updated for a long time:
www.vbr.wz.cz
www.vbr.wz.cz
It seems to be working somehow, in the default pattern, i set the cursor at each word beginning and also word end.
The word (boundary) pattern can be adjusted for individuall needs, possibly
/\S+[ \t]*/g
may work (?)
(I think, there are (were?) some limitations with regard to \w \b etc. with regard to non-ascii unicode characters via scripting in PSPad; hence the simpler whitespace-based pattern.)
- Looking at the code now, I am not sure, why it needed to be that complicated, there might be some peculiarities for former versions od the scripting (?)
hth,
vbr
Posted by: Bram | Date: 2025-10-12 22:57 | IP: IP Logged
Thanks for checking !
As a quick fix, I will play with pspad scripting then to solve it.
Editor PSPad - freeware editor, © 2001 - 2025 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR