]> git.mdlowis.com Git - projs/tide.git/commitdiff
tweaked colors to match original acme and fixed a bug in pty that mishandled the...
authorMichael D. Lowis <mike@mdlowis.com>
Wed, 20 Nov 2019 03:57:17 +0000 (22:57 -0500)
committerMichael D. Lowis <mike@mdlowis.com>
Wed, 20 Nov 2019 03:57:17 +0000 (22:57 -0500)
config.h
src/lib/draw.c
src/lib/xpty.c

index 624026866677e2877a60644b1a886e06327d7c18..4b9023def11144ad6200359ccaed3926c92e1f7a 100644 (file)
--- a/config.h
+++ b/config.h
@@ -62,6 +62,22 @@ int WinWidth, WinHeight, ScrollWidth, Timeout, TabWidth, ScrollBy,
 #endif
 
 static int Palette[ClrCount] = {
+#if 1 /* Original Acme Colors */
+    [EditBg]   = 0xFFFFEA, /* Edit region background */
+    [EditFg]   = 0x000000, /* Edit region text */
+    [EditSel]  = 0xEEEE9E, /* Edit region selection */
+    [TagsBg]   = 0xEAFFFF, /* Tags region background */
+    [TagsFg]   = 0x000000, /* Tags region text */
+    [TagsSel]  = 0x9EEEEE, /* Tags region selection */
+    [ScrollBg] = 0x99994C, /* Scroll region background */
+    [ScrollFg] = 0xFFFFEA, /* Scroll region foreground */
+    [VerBdr]   = 0x99994C, /* Vertical border */
+    [HorBdr]   = 0x000000, /* Horizontal border */
+    [Point]    = 0xFFFFFF, /* Point background */
+    [Purple]   = 0x6666CC, /* Purple */
+    [Red]      = 0xCC0000, /* Red */
+    [Orange]   = 0xFF7700, /* Orange */
+#else
     [Red]      = 0xD1160B, /* Red */
     [Purple]   = 0x7878BA, /* Purple */
     [Orange]   = 0xF39812, /* Orange */
@@ -75,7 +91,8 @@ static int Palette[ClrCount] = {
     [ScrollFg] = 0xF0F0E5, /* Scroll region foreground */
     [VerBdr]   = 0x909047, /* Vertical border */
     [HorBdr]   = 0x000000, /* Horizontal border */
-    [Point]   = 0x98BE8F, /* Window border */
+    [Point]    = 0x98BE8F, /* Window border */
+#endif
 };
 
 #pragma GCC diagnostic pop
index 0775708f71a4ba684ec864accfdd6fe1559137f4..d9a14b6caf01cb07dd64528c9cba846466ce8eae 100644 (file)
@@ -48,7 +48,7 @@ void draw_view(XConf* x, View* view, XftFont* font, size_t nrows, drawcsr* csr,
             if (rune == '\r' || rune == '\n' ||  rune == '\t')
                 rune = ' ';
             if (buf_inpoint(&(view->buffer), row->cols[i].off))
-                draw_rect(x, TagsBg, posx, y, row->cols[i].width, fheight);
+                draw_rect(x, Point, posx, y, row->cols[i].width, fheight);
             if (buf_insel(&(view->buffer), row->cols[i].off))
                 draw_rect(x, sel, posx, y, row->cols[i].width, fheight);
             if (row->cols[i].off == view->buffer.selection.end)
index 8de81c8e9ee1d22209938b60c435fde417727bdf..07b60b49f0680c3b589c10bb6ea1974dce546bbc 100644 (file)
@@ -99,6 +99,8 @@ int xpty_run(View* view, char** cmd)
                 view_delete(view, LEFT, false);
             }
             view->buffer.oninsert = putb;
+            view->buffer.point.beg = view->buffer.selection.end;
+            view->buffer.point.end = view->buffer.selection.end;
             struct termios tio;
             tcgetattr(Pty_Fd, &tio);
             tio.c_lflag      &= ~(ECHO | ECHONL);