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

Re: Bug#134474: zsh misbehaves if LINES=2



> This is from SINGLE_LINE_ZLE mode, which is automatically turned on when
> LINES becomes too small, and is done by singlerefresh() rather than by
> the prompt code.  The right-side prompt is turned off in this case as
> well.  This is (sort of, not well) documented in "man zshzle".
> 
> However, the prompt code disables termcap sequences like underlining on
> short terminals; see Src/prompt.c:tsetcap().  This is probably done in
> support of SINGLE_LINE_ZLE, but if so I think it ought to be based on
> the option setting rather than on (termflags & TERM_SHORT).
> 
> Geoff?

Like this?

Index: Src/prompt.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/prompt.c,v
retrieving revision 1.19
diff -u -r1.19 prompt.c
--- Src/prompt.c	22 Jun 2004 13:10:02 -0000	1.19
+++ Src/prompt.c	23 Jul 2004 18:03:59 -0000
@@ -746,7 +746,7 @@
 mod_export void
 tsetcap(int cap, int flag)
 {
-    if (!(termflags & TERM_SHORT) && tcstr[cap]) {
+    if (!isset(SINGLE_LINE_ZLE) && tcstr[cap]) {
 	switch(flag) {
 	case -1:
 	    tputs(tcstr[cap], 1, putraw);



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