Uncommon cursor movement using Ctrl+Right for inline renaming and ::text()

Things you’d like to miss in the future...
Post Reply
matewo
Posts: 70
Joined: 03 Jun 2018 21:35

Uncommon cursor movement using Ctrl+Right for inline renaming and ::text()

Post by matewo »

Hi All,

I observed following behaviour moving the text cursor using CTRL+Right and would like to ask, if this is intended (or not). It applies to these three examples:
  • (inline) renaming a folder / file
  • showing single line of text via ::text()
  • showing multiple lines of text via ::text()

1. When renaming a Folder

I created a sample folder named "Abc--def--ghi". When renaming (F2) the folder, I set the cursor at the beginning of the name (before "A"). In this description, the cursor is marked with the pipe symbol. See (1) below. When I press CTRL+Right five times, the cursor moves to the end of the file name in five steps. See (2).

Code: Select all

(1)    |Abc--def--ghi    # cursor | at beginning 

(2)    Abc-|-def--ghi    # 1st CTRL+Right
       Abc--|def--ghi    # 2nd CTRL+Right
       Abc--def-|-ghi    # 3rd CTRL+Right
       Abc--def--|ghi    # 4th CTRL+Right
       Abc--def--ghi|    # 5th CTRL+Right
When I move the cursor from the end back to the beginning of the text, it moves in three steps (3), which looks fine:

Code: Select all

(3)    Abc--def--ghi|    # cursor | at end
       Abc--def--|ghi    # 1st Ctrl+Left
       Abc--|def--ghi    # 2nd Ctrl+Left
       |Abc--def--ghi    # 3rd Ctrl+Left
Comparing (2) with Windows Explorer, Notepad, Notepad++ or Cudatext, the cursor is positioned at the beginning or end of "words", but never between two dashes "...-|-..." Is this intended?

The INI file contains the key WordBreakers and might relate to this. Its value is unchanged. See down below.

My guess is, that, moving the cursor to the right, XYplorer sets the cursor after the first occurrence of any character in WordBreakers, but not after all consecutive occurrences.

The test case Abc-_,def-_,ghi seems to support my guess.


2.a When showing single line of text via ::text()

When showing a single line of text using ::text(),

::text("Abc-,_def-,_ghi")

the cursor moves this way. Setting cursor on beginning of line (4), the cursor moves to the right as described above:

Code: Select all

(4)    |Abc-,_def-,_ghi    # cursor | at beginning
       Abc-|,_def-,_ghi    # 1st CTRL+Right
       Abc-,|_def-,_ghi    # 2nd CTRL+Right
       Abc-,_|def-,_ghi    # 3rd CTRL+Right
       Abc-,_def-|,_ghi    # 4th CTRL+Right
       Abc-,_def-,|_ghi    # 5th CTRL+Right
       Abc-,_def-,_|ghi    # 6th CTRL+Right
       Abc-,_def-,_ghi|    # 7th CTRL+Right

2.b When showing multiple lines of text via ::text()

In this case I show this text:

::text("<crlf>Abc-,_def-,_ghi<crlf>")

Code: Select all

==========================================
|                  # first  line
Abc-,_def-,_ghi    # second line, line ends after i
                   # third  line
==========================================
The cursor moves through the text as:

Code: Select all

==========================================
                   # first  line
Abc-,|_def-,_ghi   # second line,          1st CTRL+Right
                   # third  line
==========================================
Abc-,_|def-,_ghi   # JUST the second line, 2nd CTRL+Right
Abc-,_def-|,_ghi   # JUST the second line, 3rd CTRL+Right
Abc-,_def-,|_ghi   # JUST the second line, 4th CTRL+Right
Abc-,_def-,_|ghi   # JUST the second line, 5th CTRL+Right
==========================================
                   # first  line
Abc-,_def-,_ghi    # second line,          6th CTRL+Right
|                  # third  line
==========================================
The cursor is not positioned at the beginning, not at Abc-|,_def-,_ghi, and not at the end of the second line.

Thanks and best regards, Markus

P.S.: for all samples I used a freshly unzipped archive of XYplorer 24.10.0000.

WordBreakers=".:,; _-~(){}[]<>|/\^°*?"!§$%&=+#"

admin
Site Admin
Posts: 60595
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Uncommon cursor movement using Ctrl+Right for inline renaming and ::text()

Post by admin »

Thanks for the report!

For now I can just confirm your findings. I'll look into it later.

Post Reply