groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 01/01: eqn: Fix implicite space after unary op. issue


From: Carsten Kunze
Subject: [groff] 01/01: eqn: Fix implicite space after unary op. issue
Date: Tue, 19 Apr 2016 19:55:20 +0000

carstenkunze pushed a commit to branch master
in repository groff.

commit 08926c0eb07f421338e2dfe248ec006e3c7da367
Author: Carsten Kunze <address@hidden>
Date:   Tue Apr 19 21:51:02 2016 +0200

    eqn: Fix implicite space after unary op. issue
    
    Problem reported by Douglas McIlroy <address@hidden>
---
 ChangeLog                |   21 +++++++++++++++++++++
 src/preproc/eqn/list.cpp |    1 +
 2 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e688ed0..66961cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2016-04-19  Carsten Kunze  <address@hidden>
+
+       eqn: Fix problem with explicite spacing before unary operator
+
+       * src/preproc/eqn/list.cpp (list_box::compute_metrics): Change
+       item spacing type from BINARY to ORDINARY also when previous
+       type is SUPPRESS_TYPE.
+
+       As reported in
+
+       http://lists.gnu.org/archive/html/groff/2016-04/msg00024.html
+
+       by Douglas McIlroy <address@hidden>
+
+       an implicite space is added between an unary operator and it's
+       operand when an explicite space is put before the unary
+       operator.  Unary operators are initially set up as binary.
+       Depending on the preceding element their type can be changed
+       to unary.  This did not happen when an explicite space ('~' or
+       '^') had been before that operator.
+
 2016-02-16  Bálint Réczey  <address@hidden>
 
        Fix many malloc/new vs. free/delete/delete[] mismatches (#47164)
diff --git a/src/preproc/eqn/list.cpp b/src/preproc/eqn/list.cpp
index 9e6e359..d77f771 100644
--- a/src/preproc/eqn/list.cpp
+++ b/src/preproc/eqn/list.cpp
@@ -101,6 +101,7 @@ int list_box::compute_metrics(int style)
          || prevt == OPERATOR_TYPE
          || prevt == RELATION_TYPE
          || prevt == OPENING_TYPE
+         || prevt == SUPPRESS_TYPE
          || prevt == PUNCTUATION_TYPE)
        list.p[i]->spacing_type = ORDINARY_TYPE;
     }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]