Re: Newline is ignored at end of string in text windows
Posted by
Wayne Rasband-2 on
Jul 05, 2018; 10:12pm
URL: http://imagej.273.s1.nabble.com/Newline-is-ignored-at-end-of-string-in-text-windows-tp5020909p5020916.html
> On Jul 5, 2018, at 4:07 AM, Stein Rørvik <
[hidden email]> wrote:
>
> There is an issue with the way the linebreak \n symbol is handled when writing to text windows.
> If the line ends in an explicit \n symbol (to give an extra linebreak), it is just ignored.
The bug that caused print("\n\n”) to be ignored is fixed in the latest ImageJ daily build (1.52e34). It’s also fixed in the 1.52e release candidate.
-wayne
> See the following three cases which one would expect to give the same result; the third one is printed wrongly.
>
> This could perhaps also be a windows-only issue, perhaps related to the previous one I just posted to the list.
>
> print("\\Clear");
> print("----------");
>
> print("abc");
> print(""); //ok
> print(""); //ok
> print("123");
>
> print("----------");
>
> print("abc");
> print("\n\n123"); //ok
>
> print("----------");
>
> print("abc");
> print("\n\n"); //entire string is ignored
> print("123");
>
> print("----------");
>
>
> I am using daily build ImageJ 1.51e with Java 1.6 on Windows 7/64-bit.
>
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html