From b934a0150a761c1040018386e14c0cb49a209a44 Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Mon, 5 Jun 2017 09:16:45 -0400 Subject: [PATCH] ruler needs to adjust position if the gutter is visible --- lib/win.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/win.c b/lib/win.c index aa19f12..d3d9274 100644 --- a/lib/win.c +++ b/lib/win.c @@ -217,10 +217,11 @@ static void onredraw(int width, int height) { x11_draw_rect(CLR_HorBorder, 0, Regions[i].y - 3, width, 1); if (i == EDIT) { + size_t gsz = gutter_size(); if (Ruler) - x11_draw_rect(CLR_Ruler, (Ruler+2) * fwidth, Regions[i].y-2, 1, Regions[i].height+7); + x11_draw_rect(CLR_Ruler, ((Ruler+2) * fwidth) + gsz, Regions[i].y-2, 1, Regions[i].height+7); if (LineNumbers) - x11_draw_rect(CLR_Ruler, Regions[SCROLL].width, Regions[SCROLL].y-2, gutter_size(), Regions[SCROLL].height+7); + x11_draw_rect(CLR_Ruler, Regions[SCROLL].width, Regions[SCROLL].y-2, gsz, Regions[SCROLL].height+7); } size_t gcols = gutter_cols(); -- 2.54.0