* Bug 16549 fixed: simple script crashed Scilab in GUI mode 82/21582/8
authormottelet <stephane.mottelet@utc.fr>
Thu, 1 Oct 2020 10:13:51 +0000 (12:13 +0200)
committerCedric Delamarre <cdl@esi-group.com>
Fri, 2 Oct 2020 10:16:52 +0000 (12:16 +0200)
commit0524be91e55f6730caaf4fd025a7479b67b5ba89
tree7d94c5632521bae23da10cc8f29790f8de9527a9
parent3503356ba4f9468a3da280d185a9fdcbac9598b9
* Bug 16549 fixed: simple script crashed Scilab in GUI mode

https://bugzilla.scilab.org/show_bug.cgi?id=16549

This patch fixes the problem and reconsiders the processing
of carriage returns in Scilab output. Only the last occurence was
considered in https://codereview.scilab.org/#/c/21166/

Now the output is exactly the same in GUI and CLI mode:

--> mprintf("%s\n123456\rabc\rZ",getscilabmode())
STD
Zbc456

--> mprintf("%s\n123456\rabc\rZ",getscilabmode())
NW
Zbc456

Moreover, one line counter display is now supported in all modes:

for i=1:10000; mprintf("%05d\r",i);end

Change-Id: I82f05d115afc2911466b52230cd667dee3397db2
scilab/CHANGES.md
scilab/modules/console/src/java/org/scilab/modules/console/SciOutputView.java
scilab/modules/console/tests/nonreg_tests/bug_16549.tst [new file with mode: 0644]