summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-11-06 15:08:47 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-11-06 15:08:47 (GMT)
commit59289d47cba1dbd078ad2bb5df0be74fa7c958b5 (patch)
tree7c321ecce99a8ed8c1957722d854aff2f3cfdd5d
parent6f89c15215b746f050f8280fac14a77e50bf8077 (diff)
Added margins between columns only after non-empty columns.
-rw-r--r--ChangeLog5
-rw-r--r--src/glibext/gbufferline.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 243a41a..577579c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
16-11-06 Cyrille Bagard <nocbos@gmail.com>
+ * src/glibext/gbufferline.c:
+ Add margins between columns only after non-empty columns.
+
+16-11-06 Cyrille Bagard <nocbos@gmail.com>
+
* src/glibext/linesegment.c:
Handle tabulations as small separation paddings.
diff --git a/src/glibext/gbufferline.c b/src/glibext/gbufferline.c
index 34f1ac0..5f1756d 100644
--- a/src/glibext/gbufferline.c
+++ b/src/glibext/gbufferline.c
@@ -1469,7 +1469,10 @@ void g_buffer_line_draw(GBufferLine *line, cairo_t *cairo, const line_width_summ
{
max_width = g_buffer_line_compute_max_width(line, i, summary);
- x += max_width + COL_MARGIN;
+ x += max_width;
+
+ if (max_width > 0)
+ x += COL_MARGIN;
}