Possible bug with ctrl+arrow/select in text mode

Having trouble installing Oxygen? Got a bug to report? Post it all here.
jdnCsAoT6unA6s3n8gfD
Posts: 6
Joined: Thu Oct 08, 2020 1:06 pm

Possible bug with ctrl+arrow/select in text mode

Post by jdnCsAoT6unA6s3n8gfD »

Hi,

Editing xml documents in text mode I see a strange behaviour when working with strings containing underscores.

Reproduce it like this:

Code: Select all

FOO_BAR_01
1) Place the cursor in front of the FOO for the snippet above.
2) Press CTRL+Right arrow to jump to the end of the word. It will jump to between the two 'O's. I would have expected it to jump to the position behind the second O.

Repeat the steps above for BAR and it will work as expected. From what I see it works fine if the next group of characters a) starts with a digit b) isn't there at all, i.e. the string just ends with an underscore or for the last group of characters e.g. in FOO_BAR it will work for BAR. The same unexpected behaviour occurs when using ctrl+shift+arrow to mark words.

Interestingly double clicking FOO correctly selects the complete 'FOO' and not just 'FO'.

Newest build in which I reproduced this:<oXygen/> XML Author 24.0, build 2021101506

Thanks,
jdnCsAoT6unA6s3n8gfD
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Possible bug with ctrl+arrow/select in text mode

Post by adrian »

Hello,

I can confirm the behaviour. The "next word" detection is trying to be smart but seems to be confused when all caps are being used, it assumes a capitalized word starts there.
e.g.
FooBar, FooB_a_r, Foo_Bar_01
In all cases it stops just before the capitalized B. This is what was intended.

I've logged this on our issue tracking tool to be investigated and handled differently.
Interestingly double clicking FOO correctly selects the complete 'FOO' and not just 'FO'.
Double clicking works differently, it ignores capitalization. Symbols and spaces are the only separators.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply