From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: menu-select without ZLS_COLOURS
Date: Tue, 29 Jun 1999 08:58:34 +0200 (MET DST) [thread overview]
Message-ID: <199906290658.IAA21210@beta.informatik.hu-berlin.de> (raw)
This patch makes menu-selection use the codes for `%S' and `%s' as a
default if ZLS_COLO(|U)RS is not set.
Hm, should we do this if ZLS_* is set but does not define `ma', too?
But the other defaults for it are vt100'ish anyway...
Bye
Sven
diff -u os/Zle/complist.c Src/Zle/complist.c
--- os/Zle/complist.c Mon Jun 28 16:18:36 1999
+++ Src/Zle/complist.c Mon Jun 28 22:33:51 1999
@@ -198,7 +198,7 @@
/* This initializes the given terminal color structure. */
-static int
+static void
getcols(Listcols c)
{
char *s;
@@ -206,16 +206,17 @@
if (!(s = getsparam("ZLS_COLORS")) &&
!(s = getsparam("ZLS_COLOURS"))) {
- if (!c)
- return 1;
for (i = 0; i < NUM_COLS; i++)
c->cols[i] = "";
-
c->exts = NULL;
- return 1;
+
+ if (!(c->cols[COL_MA] = tcstr[TCSTANDOUTBEG]) ||
+ !c->cols[COL_MA][0])
+ c->cols[COL_MA] = "";
+ else
+ c->cols[COL_EC] = tcstr[TCSTANDOUTEND];
+ return;
}
- if (!c)
- return 0;
/* We have one of the parameters, use it. */
memset(c, 0, sizeof(*c));
s = dupstring(s);
@@ -230,7 +231,7 @@
if (!c->cols[COL_MI])
c->cols[COL_MI] = c->cols[COL_FI];
- return 0;
+ return;
}
static int last_col = COL_NO;
@@ -651,8 +652,8 @@
int i = 0;
char *s;
- if (getcols(NULL) || (dummy && (!(s = getsparam("SELECTMIN")) ||
- (dat && dat->num < atoi(s)))))
+ if (dummy && (!(s = getsparam("SELECTMIN")) ||
+ (dat && dat->num < atoi(s))))
return 1;
selectlocalmap(mskeymap);
diff -u od/Zsh/mod_complist.yo Doc/Zsh/mod_complist.yo
--- od/Zsh/mod_complist.yo Mon Jun 28 16:18:48 1999
+++ Doc/Zsh/mod_complist.yo Mon Jun 28 22:32:02 1999
@@ -92,7 +92,9 @@
list. In the list one match is highlighted using the value for tt(ma)
from the tt(ZLS_COLORS) or tt(ZLS_COLOURS) parameter. The default
value for this it `tt(7)' which forces the selected match to be
-highlighted using standout mode on a vt100 compatible terminal.
+highlighted using standout mode on a vt100 compatible terminal. If
+neither tt(ZLS_COLORS) nor tt(ZLS_COLOURS) is set, the same terminal
+control sequence is used as for the `tt(%S)' escape in prompts.
Selecting matches is done by moving the mark around using the zle movement
functions. The zle functions tt(send-break) and tt(accept-line) can be used
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
reply other threads:[~1999-06-29 6:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199906290658.IAA21210@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).