]> git.mdlowis.com Git - projs/tide.git/commitdiff
Correct the positioning of the ruler
authorMichael D. Lowis <mike@mdlowis.com>
Sun, 26 Mar 2017 00:12:54 +0000 (20:12 -0400)
committerMichael D. Lowis <mike@mdlowis.com>
Sun, 26 Mar 2017 00:12:54 +0000 (20:12 -0400)
lib/win.c
xedit.c

index 74d429944977cc6a2d60d9635c4877a5bc321a19..20c783b3f2a732451bc3df4aa597dd2f98647d4b 100644 (file)
--- 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 d82c8a30bd89a391e839ae7a2a7cf25a4f37aa84..4d81018520ab77f85c0393fefa289fb96776df28 100644 (file)
--- 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     },