[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 04/04: [tbl]: Compensate harder (Savannah #62471).
|
From: |
G. Branden Robinson |
|
Subject: |
[groff] 04/04: [tbl]: Compensate harder (Savannah #62471). |
|
Date: |
Mon, 15 Jan 2024 18:36:10 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit db07433b17c2874d70c011808be8823e7323f068
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sun Jan 14 10:00:10 2024 -0600
[tbl]: Compensate harder (Savannah #62471).
[tbl]: Re-fix Savannah #62471 (vrules in nroff and no-space modes).
* src/preproc/tbl/table.cpp (do_top): Compensate harder for
non-intersected vertical rules occurring at the top of a table in
nroff mode. The previous strategy would fail if no-space mode was on
and the drawing position was at the top of a page, provoking an error
from grotty ("output above first line discarded"). Restore spacing
before issuing `sp` request.
Continues fixing Savannah #62471, and commit 6ccdab9d64, 29 December.
---
ChangeLog | 15 +++++++++++++++
src/preproc/tbl/table.cpp | 7 +++++--
2 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 768cd8ca8..33cb92375 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2024-01-14 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [tbl]: Re-fix Savannah #62471 (vrules in nroff and no-space
+ modes).
+
+ * src/preproc/tbl/table.cpp (do_top): Compensate harder for
+ non-intersected vertical rules occurring at the top of a table
+ in nroff mode. The previous strategy would fail if no-space
+ mode was on and the drawing position was at the top of a page,
+ provoking an error from grotty ("output above first line
+ discarded"). Restore spacing before issuing `sp` request.
+
+ Continues fixing Savannah #62471, and commit 6ccdab9d64, 29
+ December.
+
2024-01-14 G. Branden Robinson <g.branden.robinson@gmail.com>
[tbl]: Add another test case.
diff --git a/src/preproc/tbl/table.cpp b/src/preproc/tbl/table.cpp
index 93ab4b9ff..c3e65d429 100644
--- a/src/preproc/tbl/table.cpp
+++ b/src/preproc/tbl/table.cpp
@@ -3066,8 +3066,11 @@ void table::do_top()
// horizontal rule on the first row. This is necessary for grotty's
// rule intersection detection. We must make room for it so that the
// vertical rule is not drawn above the top of the page.
- else if ((flags & HAS_TOP_VRULE) && !(flags & HAS_TOP_HRULE))
- prints(".if n .sp\n");
+ else if ((flags & HAS_TOP_VRULE) && !(flags & HAS_TOP_HRULE)) {
+ prints(".if n \\{\\\n");
+ prints(". \\\" Compensate for vertical rule at top of table.\n");
+ prints(". rs\n. sp\n.\\}\n");
+ }
prints(".nr " STARTING_PAGE_REG " \\n%\n");
//printfs(".mk %1\n", row_top_reg(0));
}
| [Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 04/04: [tbl]: Compensate harder (Savannah #62471).,
G. Branden Robinson <=