From 5ab30ee051f06bf5482ca26550c3fd3a63d644ee Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Sat, 25 Mar 2017 20:12:54 -0400 Subject: [PATCH] Correct the positioning of the ruler --- lib/win.c | 2 +- xedit.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/win.c b/lib/win.c index 74d4299..20c783b 100644 --- a/lib/win.c +++ b/lib/win.c @@ -170,7 +170,7 @@ static void onredraw(int width, int height) { 0, Regions[i].y - 3, width, Regions[i].height + 8); x11_draw_rect(CLR_BASE01, 0, Regions[i].y - 3, width, 1); if ((i == EDIT) && (Ruler != 0)) - x11_draw_rect(CLR_BASE02, (Ruler+1) * fwidth, Regions[i].y-2, 1, Regions[i].height+7); + x11_draw_rect(CLR_BASE02, (Ruler+2) * fwidth, Regions[i].y-2, 1, Regions[i].height+7); for (size_t y = 0; y < view->nrows; y++) { Row* row = view_getrow(view, y); draw_glyphs(Regions[i].x, Regions[i].y + ((y+1) * fheight), row->cols, row->rlen, row->len); diff --git a/xedit.c b/xedit.c index d82c8a3..4d81018 100644 --- a/xedit.c +++ b/xedit.c @@ -24,7 +24,7 @@ static int SearchDir = DOWN; static char* SearchTerm = NULL; /* Tag/Cmd Execution - *****************************************************************************/ + ******************************************************************************/ static Tag* tag_lookup(char* cmd) { size_t len = 0; Tag* tags = Builtins; @@ -104,7 +104,7 @@ static void exec(char* cmd) { } /* Action Callbacks - *****************************************************************************/ + ******************************************************************************/ static void delete(void) { bool byword = x11_keymodsset(ModCtrl); view_delete(win_view(FOCUSED), RIGHT, byword); @@ -150,7 +150,7 @@ static void save(void) { } /* Mouse Handling - *****************************************************************************/ + ******************************************************************************/ void onmouseleft(WinRegion id, size_t count, size_t row, size_t col) { if (count == 1) { if (x11_keymodsset(ModShift)) @@ -187,7 +187,7 @@ void onmouseright(WinRegion id, size_t count, size_t row, size_t col) { } /* Keyboard Handling - *****************************************************************************/ + ******************************************************************************/ static void del_to_bol(void) { view_bol(win_view(FOCUSED), true); if (view_selsize(win_view(FOCUSED)) > 0) @@ -430,7 +430,7 @@ static void newline(void) { } /* Main Routine - *****************************************************************************/ + ******************************************************************************/ static Tag Builtins[] = { { .tag = "Quit", .action.noarg = quit }, { .tag = "Save", .action.noarg = save }, -- 2.49.0