Toad World® Forums

Cursor offset when copying from Data Grid into Editor


#1

When executing the following query in an Editor

SELECT 0,0 FROM dual;

and copy-pasting the result into the Editor window, the cursor is not after the second zero, but before:

0 |0
instead of
0 0|

That’s not what I would expect, can anyone reproduce this?


#2

Hi,

and copy-pasting the result into the Editor window,
How do you copy result from the grid … this is very interesting?

Let see sqlplus result (no Toad: influence) 11.2.0.3:
SQL> SELECT 0,0 FROM dual;

     0          0

     0          0

SQL>

So “0 |0” is correct result! AFAICS!

And mIne Toad (12.5b x64) result:

0_0.png

Different is only in column names (second one) which is the inheritance behavior from that past Oracle versions (naming same name columns added “_1”, “_2” etc as suffix)

BTW, which Toad version are you using?

Last but not least, what is sense of that example, I mean what do you want to achieve?

Brg,
Damir Vadas


#3

Hi Damir,
Sorry I did not see your answer, replying to the mails does not always seem to trigger the expected actions…

I’m using TOAD 12.5.0.6 x64.

Sorry if my example was not clear, the pipe-character is the position of the cursor after pasting the selected values into the Editor.
What I would expect is the cursor at the end of the pasted text, not in the middle, and this was the simplest example I could put together.

Your screenshot is just fine, everything as expected.

Now click into your data-grid and select both returned columns (Ctrl+A).
Ctrl+C to copy the selected values.
Swtich to your Editor and paste the copied text.
Instead of positioning the cursor after the pasted text, it is before the last character.

Best regards, Peter


#4

Peter, I can reproduce this one. The problem is that we’ve overridden the default nature of the Editor with respect to pasting text that contains tabs. When I restore the original code the behavior is correct; however, it will not convert tabs to spaces as
it’s always done.

There is an IdeaPond item pertaining the pasting of tabs and how Toad incorrectly inserts 4 spaces instead of the correct 1, 2, 3, or 4 required to hit the next tab stop. In the idea it’s suggested that Toad should always just paste the clipboard contents,
tabs included, and only convert tabs when the user is typing. This is consistent with other editors. Since Toad has been converting tabs on paste for a long time I’m hesitant to just make the change without getting additional feedback on the idea. Here’s a
link to the idea on our old, read-only Idea Pond.

http://toadfororacle.ideascale.com/a/dtd/Convert-tabs-to-spaces-better/354032-8477

I’d love to send the link to the same idea on the new Idea Pond, but unfortunately you can’t search there. Ugh. Here’s the home page.
http://www.toadworld.com/products/toad-for-oracle/i/default.aspx

Michael

On 11/29/2013 07:45 AM, Peter Lang wrote:

Cursor offset when copying from Data Grid into Editor

Thread created by Peter Lang
When executing the following query in an Editor

SELECT 0,0 FROM dual;

and copy-pasting the result into the Editor window, the cursor is not after the second zero, but before:

0
|0

instead of

0 0|

That’s not what I would expect, anyone reproduce this?

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - Beta
notifications altogether.

Toad for Oracle - Beta Discussion Forum

Flag
this post as spam/abuse.


#5

This is fixed next beta. Pasting a string containing tabs will correctly set the caret position after the paste.


#6

Solution:

View - Toad Options - Editor - Behavior - Tabs - Mode - Select “Use Tabs” - Apply - OK

Enjoy !!

Cheers…