Right/Left Arrow keys and Caret Behavior on Windows

zitot

Member²
Hi,

I don't know if this is configurable. I will go through the manual but I didn't see it at a glance. Can someone else test on Mac?

Anyway

You have a string of text, "Hello, World and all who inhabit it."

You select some text. I'll simulate that with a block for the cursor and use red for the selected text. (There is no bbcode for background-color)

"Hello, World and all who inhabit it."

If you hit the right arrow key, where do you think the cursor should be?

Repeat the experiment. This time, hit the left arrow key. Where should the cursor be?

you should do both a backwards and a forward selection experiment.

"Hello, World and all who inhabit it."

Tested with PL/SQL Developer 16, Windows 10. (I'll upgrade to 11 eventually).I don't think we have any custom settings, unless the previous developer left some ini file somewhere that I never saw, hehe.

Now, the behavior on Windows Notepad, and Edge Browser, is as follows:

"Hello, World and all who inhabit it."
Left arrow key result puts the cursor at the leftmost side of the selected region.
Right arrow key result puts the cursor at the rightmost side of the selected region.
"Hello, World and all who inhabit it."
"Hello, World and all who▒ inhabit it."

Similarly, right arrow key puts the cursor at the rightmost side of the selected region.
select backwards for this one,
"Hello, World ▒and all who inhabit it."
"Hello, World ▒and all who inhabit it."
"Hello, World and all who▒ inhabit it."

In PLSQL Developer 16, actually it seems arrow key always moves cursor, instead of respecting region borders. Hmm

"Hello, World ▒and all who inhabit it."
"Hello, World▒ and all who inhabit it."
"Hello, World a▒nd all who inhabit it."

Why this matters?
Well, I just wanted to select a long SQL chain of CTEs (almost 1k lines), I am putting select * from this_cte after each one and doing C-S-Home, F8 to run, but I want to be able to press right arrow key to go to end of selected region after it runs. Or, if you have file with multiple SQL script in it, then i assume it would have similar issue when you click tab of result set and it selects the script in question. But this is how i discover that it behaves a little differently than I expect. Well, I can use bookmark, but it is very inconvienent in comparison to selecting a block of text and hit arrow key

But more generally, it's good to know how the editor works. usually i just use notepad++ because it kept feeling weird

P.s. if this happens to nobody else my install is just bugged.

-Thomas
 
Last edited:
Bug (likely related)
When using multiline selection, Ctrl+Backspace may delete whole word on one of the lines (the one the cursor is on, im not sure if its always true), or it may move to the beginning of the word on each line, and delete the first letter.. if you have selected text, i believe in the second case it deletes the first letter along with selected text.

ie. we start with two lines of hello and select both o's using a mutiline-select
hello
hello
test 1: first hello dies, second hello lives

hello

test 2: the o's die, the h's die
ell
ell

Hence I am not able to reliably predict the behavior of the hotkey Ctrl+Backspace with a multi selection.

Possible questions to ask when debugging:

Where did the multiselection start, where did it end (top left corner, top right corner, bottom left corner, bottom right corner)
What was the exact selection (region, start corner, end corner, where the blinky cursor actually is since multiline editing only shows one cursor)
What did the user input
What did the user expect
Was the selection empty (i.e. multiline select straight up and down, with no selected text, can be hard to tell if it actually did a multiline since there's only one cursor)
Is the result the same every time, given the same circumstance
Why sometimes i select the two trailing o's in hello and hit ctrl+backspace it deletes the trailing o and the starting h of both words, other times it deleted the whole word hello on one of the lines
What happens if i select a region of space after the hello's

Why can sometimes I select the o's and it deletes hell before the o on the first line, other times it deletes the first h and the o?

I apologize in advance but I was not able to set debugging flag on my PLSQL, I will need IT to do it when they have time, could be a while.

EDIT: I tried to record a video and now I can't trigger the bug. It just deletes the word before where the cursor ends up in the end. Maybe because I was going to logout.. Extremely frustrated now.
Edit2: Was able to replicate. Video attached.
View attachment vlc-record-2025-06-13-14h48m35s-screen___- - Copy.zip
 
Last edited:
Sorry, uploaded wrong file.

I've attached a gif showing the bug get triggered.


Steps to recreate:
1. Multiselect last letter of two words.
2. Hit Ctrl+Backspace

Although in the video I typed some text and hit Ctrl+Backspace and only deleted first letter, the other day it seems to also occur even when the user selects last letters, hits ctrl+Backspace, and it deletes both the selected letter and the first letter of the preceding word.

This has an element of luck in it as far as reproducing it goes.
 
Back
Top