Replies: 6 comments
-
Textadept's process spawning is asynchronous, and when a process sends output to both stdout and stderr in a very short period of time, it becomes a matter of which gets polled first, and what output is available at that time. Adding I don't think there's anything I can do here. If you really depend on sequential output for stdout and stderr, either run your command in the terminal, use |
Beta Was this translation helpful? Give feedback.
-
Why not using the approach used in SciTE output buffer? Is there any advantage of doing it the Textadept way? |
Beta Was this translation helpful? Give feedback.
-
I don't know how SciTE does it. Do you? For the GUI version I rely on Qt's or Gtk's process spawning features, and for the terminal version I have to poll manually. This is the easiest for me maintenance-wise. |
Beta Was this translation helpful? Give feedback.
-
Sorry, no idea about SciTE ... I am currently looking into geany ... with a Lua plugin an interesting alternative to going back to SciTE. |
Beta Was this translation helpful? Give feedback.
-
Running the script below instead of
resolves the issue. The Output Buffer does anyway not distinguish between stdout and stderr. |
Beta Was this translation helpful? Give feedback.
-
That's a reasonable workaround for those that need stdout and stderr to be in sync. Thanks for sharing. |
Beta Was this translation helpful? Give feedback.
-
Here the shell script edited in Textadept:
The output in the Output Buffer is:
There are two approaches which solve this issue I can use in the script itself: the first one adds a
sleep 0.01
line beforeecho '--2--'
, the other one addsexec 2>&1
. The script runs in the Terminal environment without the problem with wrong order of outputs. By the way: the same shell script code run with F5 from SciTE prints the outputs in the right order.Beta Was this translation helpful? Give feedback.
All reactions