Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: files attributes not colored by complist



>>> "SW" == Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx> writes:

[...]

 SW> This patch adds the `tc' (for type-character) and `sp' (for `space')
 SW> capabilities.

[...]

I don't want to split hairs, but I think that, while colors should
stop before file type, the menu-selection mark should still run until
the end of column.  
If you agree with this, the following apply after 8412.


--- complist.c.old	Mon Oct 25 15:58:07 1999
+++ complist.c	Mon Oct 25 16:03:22 1999
@@ -346,11 +346,7 @@
 	len = width - 2;
 	while (len-- > 0)
 	    putc(' ', shout);
-	if (mcolors.cols[COL_EC])
-	    tputs(mcolors.cols[COL_EC], 1, putshout);
-	else
-	    zcputs(&mcolors, COL_NO);
-
+	zcoff();
 	return;
     }
     m = *mp;
@@ -412,19 +408,19 @@
 	nicezputs((m->disp ? m->disp : m->str), shout);
 	len = niceztrlen(m->disp ? m->disp : m->str);
 
-        if (isset(LISTTYPES)) {
-            zcoff();
-            zcputs(&mcolors, COL_TC);
-            if (buf)
-                putc(file_type(buf->st_mode), shout);
-            else
-                putc(' ', shout);
-            len++;
+        if (isset(LISTTYPES) && buf) {
+	    if (m->gnum != mselect) {
+		zcoff();
+		zcputs(&mcolors, COL_TC);
+	    }
+	    putc(file_type(buf->st_mode), shout);
+	    len++;
         }
         if ((len = width - len - 2) > 0) {
-            zcoff();
-            zcputs(&mcolors, COL_SP);
- 
+	    if (m->gnum != mselect) {
+		zcoff();
+		zcputs(&mcolors, COL_SP);
+	    }
             while (len-- > 0)
                 putc(' ', shout);
         }


-- 
Alexandre Duret-Lutz



Messages sorted by: Reverse Date, Date, Thread, Author