]> git.mdlowis.com Git - projs/tide.git/commitdiff
made current line marker more visible and adjusted it to highlight current screen...
authorMichael D. Lowis <mike@mdlowis.com>
Mon, 12 Jun 2017 23:02:38 +0000 (19:02 -0400)
committerMichael D. Lowis <mike@mdlowis.com>
Mon, 12 Jun 2017 23:02:38 +0000 (19:02 -0400)
config.h
lib/win.c

index 5f4ec4c6a8df415f9a4b57d2a334f66a5286b43d..a4d6544d89da5e2407181413b1bbb1aef4cdee74 100644 (file)
--- a/config.h
+++ b/config.h
@@ -81,9 +81,6 @@ unsigned int ColorPalette[16] = {
 };
 
 #define COLOR_PAIR(bg, fg) (((bg) << 8) | (fg))
-int CLR_NormalText   = COLOR_PAIR(0,4);
-int CLR_GutterText   = COLOR_PAIR(0,3);
-int CLR_SelectedText = COLOR_PAIR(4,0);
 int CLR_TagsBkg      = 1;  // Background color for the tags region
 int CLR_EditBkg      = 0;  // Background color for the edit region
 int CLR_ScrollBkg    = 3;  // Background color for the scroll region
@@ -93,8 +90,12 @@ int CLR_VerBorder    = 2;  // Vertical border color
 int CLR_Ruler        = 1;  // Ruler color
 int CLR_Cursor       = 7;  // Cursor color
 
-int CLR_CurrentLine  = 13; // Current Line Number
-int CLR_Comment      = 2;  // Comment color
+/* Text Color Attributes           BG, FG */
+int CLR_NormalText   = COLOR_PAIR(  0,  4 );
+int CLR_SelectedText = COLOR_PAIR(  4,  0 );
+int CLR_GutterText   = COLOR_PAIR(  0,  3 );
+int CLR_CurrentLine  = COLOR_PAIR( 11,  7 );  // Current Line Number
+int CLR_Comment      = COLOR_PAIR(  0,  2 );  // Comment color
 
 #undef INCLUDE_DEFS
 #endif
index 7f078fb593026c78a27a72b101069951297d91c5..977139dcca2dfc294ba333c81f56f861fea17480 100644 (file)
--- a/lib/win.c
+++ b/lib/win.c
@@ -236,13 +236,11 @@ static void onredraw(int width, int height) {
         size_t gcols = gutter_cols();
         for (size_t line = 0, y = 0; y < view->nrows; y++) {
             Row* row = view_getrow(view, y);
-            if (line != row->line)
-                draw_line_num(
-                    (y == Regions[i].csry),
-                    Regions[i].x - (gcols * fwidth) - 5,
-                    Regions[i].y + ((y+1) * fheight),
-                    gcols,
-                    row->line);
+            draw_line_num( (y == Regions[i].csry),
+                           Regions[i].x - (gcols * fwidth) - 5,
+                           Regions[i].y + ((y+1) * fheight),
+                           gcols,
+                           (line != row->line ? row->line : 0) );
             draw_glyphs(Regions[i].x, Regions[i].y + ((y+1) * fheight), row->cols, row->rlen, row->len);
             line = row->line;
         }