Strings are pasted in the wrong position in new text windows

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Strings are pasted in the wrong position in new text windows

Stein Rørvik
There seems to be a bug in the way the clipboard is handled in the ImageJ built-in text editor.

Try this:

Copy some string to the clipboard from any application, e.g. MyString

Create a new text window (Ctrl-Shift-N) in ImageJ and then type something (e.g. Test)
and then paste the above string at the current cursor position (which is after your typed string)
by keyboard Ctrl-V or from the menu.

The result is MyStringTest instead of TestMyString

The pasted position seems to always come at the start of the current line or at the start of the file.
The result of this varies, depending on the length of the text already present before you try to paste.

This problem only occurs with newly created text windows;
it does not happen if you paste into a text window that was opened from a file.

I am using daily build ImageJ 1.51s on Windows 7 64-bit.

Stein


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Strings are pasted in the wrong position in new text windows

Gabriel Landini
On Friday, 17 November 2017 12:18:25 GMT you wrote:
> There seems to be a bug in the way the clipboard is handled in the ImageJ
> built-in text editor.
>
> Try this:

Hi,
I tried that, but can't reproduce it in linux64 (latest daily build) Java 8 or
Java 8.
Maybe it is a Win issue?
Cheers

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Strings are pasted in the wrong position in new text windows

Herbie
In reply to this post by Stein Rørvik
Good day Stein,

I can't confirm this behavior under macOS with Java 6.

Regards

Herbie

::::::::::::::::::::::::::::::::::::::::::
Am 17.11.17 um 13:18 schrieb Stein Rørvik:

> There seems to be a bug in the way the clipboard is handled in the
> ImageJ built-in text editor.
>
> Try this:
>
> Copy some string to the clipboard from any application, e.g.
> MyString
>
> Create a new text window (Ctrl-Shift-N) in ImageJ and then type
> something (e.g. Test) and then paste the above string at the current
> cursor position (which is after your typed string) by keyboard Ctrl-V
> or from the menu.
>
> The result is MyStringTest instead of TestMyString
>
> The pasted position seems to always come at the start of the current
> line or at the start of the file. The result of this varies,
> depending on the length of the text already present before you try to
> paste.
>
> This problem only occurs with newly created text windows; it does not
> happen if you paste into a text window that was opened from a file.
>
> I am using daily build ImageJ 1.51s on Windows 7 64-bit.
>
> Stein
>
>
> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Strings are pasted in the wrong position in new text windows

Stein Rørvik
Yes it might very well be a Win issue; probably has to do with the window and clipboard handling.
I tested it both with Java 6 and Java 8 and older ImageJ versions and see the same behaviour.
Naturally this does not happen in Fiji since that has a completely different text editor.

Stein

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Herbie
Sent: 17. november 2017 13:52
To: [hidden email]
Subject: Re: Strings are pasted in the wrong position in new text windows

Good day Stein,

I can't confirm this behavior under macOS with Java 6.

Regards

Herbie

::::::::::::::::::::::::::::::::::::::::::
Am 17.11.17 um 13:18 schrieb Stein Rørvik:

> There seems to be a bug in the way the clipboard is handled in the
> ImageJ built-in text editor.
>
> Try this:
>
> Copy some string to the clipboard from any application, e.g.
> MyString
>
> Create a new text window (Ctrl-Shift-N) in ImageJ and then type
> something (e.g. Test) and then paste the above string at the current
> cursor position (which is after your typed string) by keyboard Ctrl-V
> or from the menu.
>
> The result is MyStringTest instead of TestMyString
>
> The pasted position seems to always come at the start of the current
> line or at the start of the file. The result of this varies, depending
> on the length of the text already present before you try to paste.
>
> This problem only occurs with newly created text windows; it does not
> happen if you paste into a text window that was opened from a file.
>
> I am using daily build ImageJ 1.51s on Windows 7 64-bit.
>
> Stein
>
>
> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Strings are pasted in the wrong position in new text windows

Wayne Rasband-2
In reply to this post by Stein Rørvik
> On Nov 17, 2017, at 7:18 AM, Stein Rørvik <[hidden email]> wrote:
>
> There seems to be a bug in the way the clipboard is handled in the ImageJ built-in text editor.
>
> Try this:
>
> Copy some string to the clipboard from any application, e.g. MyString
>
> Create a new text window (Ctrl-Shift-N) in ImageJ and then type something (e.g. Test)
> and then paste the above string at the current cursor position (which is after your typed string)
> by keyboard Ctrl-V or from the menu.
>
> The result is MyStringTest instead of TestMyString

This Windows-only bug is fixed in the latest daily build (1.51u15).

-wayne

> The pasted position seems to always come at the start of the current line or at the start of the file.
> The result of this varies, depending on the length of the text already present before you try to paste.
>
> This problem only occurs with newly created text windows;
> it does not happen if you paste into a text window that was opened from a file.
>
> I am using daily build ImageJ 1.51s on Windows 7 64-bit.
>
> Stein

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Strings are pasted in the wrong position in new text windows

Stein Rørvik
Thanks, it works fine now!

Stein

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Wayne Rasband
Sent: 17. januar 2018 05:02
To: [hidden email]
Subject: Re: Strings are pasted in the wrong position in new text windows

> On Nov 17, 2017, at 7:18 AM, Stein Rørvik <[hidden email]> wrote:
>
> There seems to be a bug in the way the clipboard is handled in the ImageJ built-in text editor.
>
> Try this:
>
> Copy some string to the clipboard from any application, e.g. MyString
>
> Create a new text window (Ctrl-Shift-N) in ImageJ and then type
> something (e.g. Test) and then paste the above string at the current
> cursor position (which is after your typed string) by keyboard Ctrl-V or from the menu.
>
> The result is MyStringTest instead of TestMyString

This Windows-only bug is fixed in the latest daily build (1.51u15).

-wayne

> The pasted position seems to always come at the start of the current line or at the start of the file.
> The result of this varies, depending on the length of the text already present before you try to paste.
>
> This problem only occurs with newly created text windows; it does not
> happen if you paste into a text window that was opened from a file.
>
> I am using daily build ImageJ 1.51s on Windows 7 64-bit.
>
> Stein

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html