SciTEDoc.html:
A final command property that is currently supported only on windows is command.quiet. A value of 1 indicates that the command I/O should not be echoed to the output pane. This may be useful in combination with command.input and command.replace.selection.
Although it (correctly) doesn't echo the output, it (opinionatedly) still forces a popup on the output pane.
This fixes it.
diff --git a/scite/src/JobQueue.cxx b/scite/src/JobQueue.cxx
index 1e3b168..a6f4834 100644
--- a/scite/src/JobQueue.cxx
+++ b/scite/src/JobQueue.cxx
@@ -258,7 +258,7 @@ void JobQueue::AddCommand(const std::string &command, const FilePath &directory,
jobUsesOutputPane = false;
jobQueue[commandCurrent] = Job(command, directory, jobType, input, flags);
commandCurrent++;
- if (jobType == jobCLI)
+ if (jobType == jobCLI && !(flags & jobQuiet))
jobUsesOutputPane = true;
// For jobExtension, the Trace() method shows output pane on demand.
}
We should also test for the windows platform here, so as not to break expected behavior on non-windows systems. But if this is ok, then the new doc should probably read something like this:
A final command property[-that is currently supported only on windows-] is command.quiet. A value of 1 indicates that the command I/O should not be echoed to the output [-pane.-]{+pane (on windows systems) and that the output pane should not be toggeled open if it's hidden.+} This may be useful in combination with command.input and command.replace.selection.
How best to test it though? I reckon that there should be no platform-specific code in src/.
In case we want to use the, provisioned but currently unsued, jobVeryQuiet flag for this (and more), here's a first patch towards making the flag usable.
I see now that use of
#if defined(_WIN32)is common.I'm happy with this:
_WIN32 is actually rarely used nowadays compared to early SciTE. It is almost always a bad idea. The reason that jobQuiet is Windows-only is just that the contributor only wrote that. It would be better to implement jobQuiet on GTK and remove the "windowsonly" documentation.
Sure, let's do that. I don't know GTK though, so I hope somebody else steps
up.
Attached is a patch for GTK.
Documentation patch.
Last edit: Neil Hodgson 2020-07-06
Committed with [d227a2].
Related
Commit: [d227a2]
Committed with [d227a2].
Related
Commit: [d227a2]
Committed with [d227a2].
Related
Commit: [d227a2]