FIXED: [v16.10] CTRL-RIGHT bug

Report issues, odd behaviors or submit a detailed bug report.
Post Reply
User avatar
vha
Posts: 1080
Joined: 27 Jun 2007 21:34
Location: Belgium

FIXED: [v16.10] CTRL-RIGHT bug

Post by vha »

Have following text:

Code: Select all

aaa bbb ccc
aaa _bbb_ ccc
Cursor at the start of the 1st line
CTRL-RIGHT -> cursor to the end of aaa, ok
CTRL-RIGHT -> cursor to the end of bbb, ok

Cursor at the start of the 2nd line
CTRL-RIGHT -> cursor to the end of aaa, ok
CTRL-RIGHT -> cursor to the end of ccc, not ok

vha
User avatar
DerellLicht1
Posts: 144
Joined: 23 Jul 2021 17:38
Location: Fremont, CA, USA

Re: [v16.10] CTRL-RIGHT bug

Post by DerellLicht1 »

Yeah, this has been caused by a change that Rickard implemented at my request, but it causes anomalies in this case...

I had asked that Ctrl-left and Ctrl-right *not* stop at every symbol, but only jump between words... that would make it more efficient when traversing lines such as:
for (i=start ; i< finish ; i++) {

It also makes it more consistent with the editors that I've used in the past.

However, there is this small issue of function names which begin with underscore!!
I discovered this recently, when I started working on Unicode support in a program...
all the string functions change from strxxx to _tcsxxx - and now the Ctrl-movement keys skip those function names!!
I'm not sure what to do about this...
User avatar
DerellLicht1
Posts: 144
Joined: 23 Jul 2021 17:38
Location: Fremont, CA, USA

Re: [v16.10] CTRL-RIGHT bug

Post by DerellLicht1 »

Rickard;
Since you have already implemented separate "NoSymbol" functions for me, maybe you should change the original function back to how they historically operate??

Or perhaps you could exclude underscore from the symbols that you recognize, since they are used in function names, especially in Windows programming ??
User avatar
vha
Posts: 1080
Joined: 27 Jun 2007 21:34
Location: Belgium

Re: [v16.10] CTRL-RIGHT bug

Post by vha »

Code: Select all

for (i=start ; i< finish ; i++) {
Tested that one with Visual Code, Visual Studio and Notepad and CTRL-RIGHT has more or less the old behaviour of TextEd, stopping at almost every position (which I like way more than the new behaviour)

vha
User avatar
DerellLicht1
Posts: 144
Joined: 23 Jul 2021 17:38
Location: Fremont, CA, USA

Re: [v16.10] CTRL-RIGHT bug

Post by DerellLicht1 »

vha wrote: 16 Jan 2024 08:13

Code: Select all

for (i=start ; i< finish ; i++) {
Tested that one with Visual Code, Visual Studio and Notepad and CTRL-RIGHT has more or less the old behaviour of TextEd, stopping at almost every position (which I like way more than the new behaviour)

vha
Well, *I* was the one pushing for more efficient cursor movement... When I select next-word or previous-word, I *really* don't expect the editor to stop at every single symbol character; it is a terrific waste of effort!! I think we all understand what a 'word' is... and none of these are 'words' : []{}-=_+!@#$%^&*()

But it doesn't matter... he implemented separate functions that (mostly) do what I expect, so if he changes the original function back to their old char-by-char movement, it won't matter to me.
User avatar
rjbill
Posts: 879
Joined: 13 Jun 2011 06:36

Re: [v16.10] CTRL-RIGHT bug

Post by rjbill »

Yeah. Afaic, it's BROKEN now.
It is very irritating.

I think that Ctrl-Right-Arrow should be "Start of Next Word"
and Ctrl-Left-Arrow should be "Start of Previous Word".

With words basically being delimited by SPACE characters,
although sometimes you would like other characters, too,
for CODE situations.

I'm not sure what the best thing to do would be, but right now it's TERRIBLE.
RJTE version 16.16 (actual) - 64-bit
Win 10 Pro 64-bit 8 GB RAM Intel Core i7-6700 3.40 GHz SCSI Hard Drive 1 TB

Note: The signature is dynamic, not static,
so it may not show the correct version above
that was in use at the time of the post.
crtrubshaw
Posts: 323
Joined: 06 Jun 2012 11:08

Re: [v16.10] CTRL-RIGHT bug

Post by crtrubshaw »

Here is a little script which will move the cursor to the start of the next word, it's like PreviousWordNoSymbolsAction in reverse. You can add it as a tool and assign the Ctrl+Right shortcut.

CursorWordRight.zip
(316 Bytes) Downloaded 37 times
Last edited by crtrubshaw on 23 Jan 2024 14:56, edited 1 time in total.
User avatar
Rickard Johansson
Site Admin
Posts: 6628
Joined: 19 Jul 2006 14:29

Re: [v16.10] CTRL-RIGHT bug

Post by Rickard Johansson »

Fixed in next version (v16.11). Also added new options to change the behavior.
User avatar
rjbill
Posts: 879
Joined: 13 Jun 2011 06:36

Re: FIXED: [v16.10] CTRL-RIGHT bug

Post by rjbill »

Thank you.

BTW, maybe this is fixed, but, if you are at the front of this line (underscores are SPACEs)
and press Ctrl-Shift-Right-Arrow:

___TMemIniFile ini = TMemIniFile.Create("c:\MyFolder\Settings.ini");

It selects THIS, with the the vertical bar being the cursor:

___TMemIniFile| ini = TMemIniFile.Create("c:\MyFolder\Settings.ini");

Which I think is incorrect. It should select all the SPACEs up to the first word.

I guess the thinking is, "A 'word' that starts with a SPACE is a 'SPACE Word' ".
RJTE version 16.16 (actual) - 64-bit
Win 10 Pro 64-bit 8 GB RAM Intel Core i7-6700 3.40 GHz SCSI Hard Drive 1 TB

Note: The signature is dynamic, not static,
so it may not show the correct version above
that was in use at the time of the post.
DGladden
Posts: 22
Joined: 12 Jun 2013 14:17

Re: [v16.10] CTRL-RIGHT bug

Post by DGladden »

crtrubshaw wrote: 23 Jan 2024 13:50 Here is a little script which will move the cursor to the start of the next word, it's like PreviousWordNoSymbolsAction in reverse. You can add it as a tool and assign the Ctrl+Right shortcut.


CursorWordRight.zip
Thank you for this script. I have tried to restore the previous behavior through keyboard shortcuts and/or the environment settings but haven't found anything that works. Your script does the job.
crtrubshaw
Posts: 323
Joined: 06 Jun 2012 11:08

Re: FIXED: [v16.10] CTRL-RIGHT bug

Post by crtrubshaw »

You're welcome :) Just to let you know - it's not required, if you use the settings below the behaviour is the same.

opt.png
opt.png (54.09 KiB) Viewed 625 times
kbd.png
kbd.png (45.71 KiB) Viewed 625 times
Post Reply