gbranden pushed a commit to branch master
in repository groff.

commit 7d13a670594f0ff141ee5fb6b0c061afce29968f
Author: G. Branden Robinson <[email protected]>
AuthorDate: Tue May 7 06:43:19 2024 -0500

    [troff]: Fix missing piece of new `pline` request.
    
    * src/roff/troff/env.cpp (print_nodes_from_input_line): Fix elementary
      mistake in request implementation.  It is essential that requests call
      `skip_line()` when they are done interpreting arguments--even if there
      are none, to prevent the newline at the end of the input line from
      being interpreted as text (and causing a line or word break, depending
      on filling enablement).
    
    Not the first time I've banged my shin on this.
---
 ChangeLog              | 9 +++++++++
 src/roff/troff/env.cpp | 1 +
 2 files changed, 10 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 4fa654983..11e1edbeb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-05-07  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/env.cpp (print_nodes_from_input_line): Fix
+       elementary mistake in request implementation.  It is essential
+       that requests call `skip_line()` when they are done interpreting
+       arguments--even if there are none, to prevent the newline at the
+       end of the input line from being interpreted as text (and
+       causing a line or word break, depending on filling enablement).
+
 2024-05-06  G. Branden Robinson <[email protected]>
 
        * tmac/an-ext.tmac (YS): Clear `mS` register unconditionally.
diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp
index 79911dba1..81fc41f17 100644
--- a/src/roff/troff/env.cpp
+++ b/src/roff/troff/env.cpp
@@ -3545,6 +3545,7 @@ void print_env()
 static void print_nodes_from_input_line()
 {
   curenv->dump_node_list();
+  skip_line();
 }
 
 // Hyphenation - TeX's hyphenation algorithm with a less fancy implementation.

_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to