From: Andrey Borzenkov <arvidjaar@mail.ru>
To: zsh-workers@sunsite.dk
Subject: PATCH: fix menu completion on terminal with do=^J/without do
Date: Sun, 27 Apr 2003 12:49:49 +0400 [thread overview]
Message-ID: <200304271249.49111.arvidjaar@mail.ru> (raw)
[-- Attachment #1: Type: text/plain, Size: 592 bytes --]
Standard termcap for Linux console defines "do" (down_cursor) as ^J. Zsh
init_term ignores it in this case (Geoff, could you enlighten why it does
it?); it then provides workaround in zle_refresh by actually using ^J but
moving cursor to needed column then.
Unfortunately complist is using termcap directly and thus outputs no
down_cursor at all but believes it has moved to correct line.
The patch exports tc_downcurs and makes complist using it. I refrain from
removing ^J code in init_term not knowing reasons or possible implications.
If it is OK I commit it tomorrow.
-andrey
[-- Attachment #2: zsh_tcdown.patch --]
[-- Type: text/x-diff, Size: 1192 bytes --]
--- Src/Zle/complist.c.tcdown 2002-10-15 22:00:02.000000000 +0400
+++ Src/Zle/complist.c 2003-04-27 11:22:26.000000000 +0400
@@ -1556,7 +1556,7 @@ singledraw()
mcc2 = singlecalc(&mc2, ml2, &lc2);
if (md1)
- tcmultout(TCDOWN, TCMULTDOWN, md1);
+ tc_downcurs(md1);
if (mc1)
tcmultout(TCRIGHT, TCMULTRIGHT, mc1);
g = mgtab[ml1 * columns + mc1];
@@ -1565,7 +1565,7 @@ singledraw()
putc('\r', shout);
if (md2 != md1)
- tcmultout(TCDOWN, TCMULTDOWN, md2 - md1);
+ tc_downcurs(md2 - md1);
if (mc2)
tcmultout(TCRIGHT, TCMULTRIGHT, mc2);
g = mgtab[ml2 * columns + mc2];
@@ -1576,7 +1576,7 @@ singledraw()
if (mstatprinted) {
int i = lines - md2 - nlnct;
- tcmultout(TCDOWN, TCMULTDOWN, i - 1);
+ tc_downcurs(i - 1);
compprintfmt(NULL, 0, 1, 1, mline, NULL);
tcmultout(TCUP, TCMULTUP, lines - 1);
} else
--- Src/Zle/zle_refresh.c.tcdown 2003-04-04 17:56:44.000000000 +0400
+++ Src/Zle/zle_refresh.c 2003-04-27 11:21:14.000000000 +0400
@@ -1062,7 +1062,7 @@ tc_rightcurs(int ct)
}
/**/
-static int
+mod_export int
tc_downcurs(int ct)
{
int ret = 0;
next reply other threads:[~2003-04-27 9:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-27 8:49 Andrey Borzenkov [this message]
2003-04-27 10:27 ` Geoff Wing
2003-04-30 15:55 ` Wayne Davison
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=200304271249.49111.arvidjaar@mail.ru \
--to=arvidjaar@mail.ru \
--cc=zsh-workers@sunsite.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).