aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2015-03-16 07:19:01 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2015-03-16 07:25:38 +0100
commitcb8411d711700cd823c45cb42773c700e167de73 (patch)
treed49b61fd4b3cf9ef05e3d4fe120c400eb1e5fada /src
parentc310c7d875c8aa871180de130e820ed19a2489f5 (diff)
downloadsciteco-cb8411d711700cd823c45cb42773c700e167de73.tar.gz
documented the automatic EOL translation feature
Diffstat (limited to 'src')
-rw-r--r--src/parser.cpp11
-rw-r--r--src/spawn.cpp12
2 files changed, 20 insertions, 3 deletions
diff --git a/src/parser.cpp b/src/parser.cpp
index 7d242fd..6ca6652 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -1852,7 +1852,7 @@ StateECommand::custom(gchar chr)
* [off,]on ED
* ED -> flags
*
- * With arguments, the command will set the ED flags.
+ * With arguments, the command will set the \fBED\fP flags.
* <flags> is a bitmap of flags to set.
* Specifying one argument to set the flags is a special
* case of specifying two arguments that allow to control
@@ -1866,6 +1866,8 @@ StateECommand::custom(gchar chr)
* Without any argument ED returns the current flags.
*
* Currently, the following flags are used by \*(ST:
+ * - 16: Enable/disable automatic translation of end of
+ * line sequences to and from line feed.
* - 32: Enable/Disable buffer editing hooks
* (via execution of macro in global Q-Register \(lqED\(rq)
* - 64: Enable/Disable function key macros
@@ -1875,6 +1877,9 @@ StateECommand::custom(gchar chr)
*
* The features controlled thus are discribed in other sections
* of this manual.
+ *
+ * The default value of the \fBED\fP flags is 16
+ * (only automatic EOL translation enabled).
*/
case 'D':
BEGIN_EXEC(&States::start);
@@ -2006,8 +2011,8 @@ StateECommand::custom(gchar chr)
* Like the Scintilla message, <EL> does \fBnot\fP change the
* characters in the current document.
* If automatic EOL translation is activated (which is the default),
- * \*(ST will however use this information when saving and writing
- * out files.
+ * \*(ST will however use this information when saving files or
+ * writing to external processes.
*
* With one argument, the EOL mode is set according to these
* constants:
diff --git a/src/spawn.cpp b/src/spawn.cpp
index af42a95..c1ffce8 100644
--- a/src/spawn.cpp
+++ b/src/spawn.cpp
@@ -133,8 +133,17 @@ parse_shell_command_line(const gchar *cmdline, GError **error)
* and its standard input stream is fed with data from the
* current document, i.e. text is piped into the external
* program.
+ * When automatic EOL translation is enabled, this will
+ * translate all end of line sequences according to the
+ * source document's EOL mode (see \fBEL\fP command).
+ * For instance when piping from a document with DOS
+ * line breaks, the receiving program will only be sent
+ * DOS line breaks.
* The process' standard output stream is also redirected
* and inserted into the current document.
+ * End of line sequences are normalized accordingly
+ * but the EOL mode guessed from the program's output is
+ * \fBnot\fP set on the document.
* The process' standard error stream is discarded.
* If data is piped into the external program, its output
* replaces that data in the buffer.
@@ -455,6 +464,9 @@ gerror:
* the current buffer position and writing process output
* to the Q-Register <q>.
* In other words, the current buffer is not modified by EG.
+ * Also since EG replaces the string value of <q>, the register's
+ * EOL mode is set to the mode guessed from the external program's
+ * output.
*
* The register <q> is defined if it does not already exist.
*/