zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Pre-5.0.5 part 3:  Heuristic for ZLE_RPROMPT_INDENT
Date: Sun, 02 Feb 2014 13:58:37 -0800	[thread overview]
Message-ID: <140202135837.ZM15483@torch.brasslantern.com> (raw)

Another one we agreed to leave for after a stable release.  This takes a
best guess at whether the terminal can handle having a character written
to the lower right corner, and removes an unnecessary import from the
environment [it is already handled correctly by the generic environment
import in createparamtable()].

diff --git a/Src/init.c b/Src/init.c
index bd871cb..da2a1bf 100644
--- a/Src/init.c
+++ b/Src/init.c
@@ -749,9 +749,8 @@ init_term(void)
 	    tcstr[TCCLEARSCREEN] = ztrdup("\14");
 	    tclen[TCCLEARSCREEN] = 1;
 	}
-#if 0	/* This might work, but there may be more to it */
+	/* This might work, but there may be more to it */
 	rprompt_indent = (hasye || !tccan(TCLEFT)) ? 1 : 0;
-#endif
     }
     return 1;
 }
@@ -1003,15 +1002,6 @@ setupvals(void)
     setiparam("COLUMNS", zterm_columns);
     setiparam("LINES", zterm_lines);
 #endif
-    {
-	/* Import from environment, overrides init_term() */
-	struct value vbuf;
-	char *name = "ZLE_RPROMPT_INDENT";
-	if (getvalue(&vbuf, &name, 1) && !(vbuf.flags & PM_UNSET))
-	    rprompt_indent = getintvalue(&vbuf);
-	else
-	    rprompt_indent = 1;
-    }
 
 #ifdef HAVE_GETRLIMIT
     for (i = 0; i != RLIM_NLIMITS; i++) {


             reply	other threads:[~2014-02-02 21:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-02 21:58 Bart Schaefer [this message]
2014-02-07  9:45 ` Oliver Kiddle
2014-02-07 16:46   ` Bart Schaefer
2014-02-08 19:58     ` Bart Schaefer
2014-02-17 16:12       ` Mikael Magnusson
2014-02-17 18:34         ` Bart Schaefer
2014-12-08  0:46           ` Mikael Magnusson
2014-12-08  4:20             ` Bart Schaefer

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=140202135837.ZM15483@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /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).