about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2014-02-02 14:07:23 -0800
committerBarton E. Schaefer <schaefer@zsh.org>2014-02-02 14:07:23 -0800
commit71b235bfa7dccc3b5b12433a9d41127a137df757 (patch)
tree4645655d3cd8319abab39d4b92869f5d328e9201
parent620b915c4e1df33cc5df679408518281cfb81f93 (diff)
downloadzsh-71b235bfa7dccc3b5b12433a9d41127a137df757.tar.gz
zsh-71b235bfa7dccc3b5b12433a9d41127a137df757.tar.xz
zsh-71b235bfa7dccc3b5b12433a9d41127a137df757.zip
32341: heuristic initialization of ZLE_RPROMPT_INDENT
-rw-r--r--ChangeLog5
-rw-r--r--Src/init.c12
2 files changed, 5 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index fe427c2fe..26e628736 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,11 @@
 2014-02-02  Barton E. Schaefer  <schaefer@zsh.org>
 
+	* 32341: Src/init.c: guess at best ZLE_RPROMPT_INDENT based on
+	termcap/terminfo description
+
 	* unposted: Src/Zle/zle_tricky.c: whitespace in comment
 
-	* 32340: Src/init.c, Src/Zle/compctl.c:  Add specifics to error
+	* 32340: Src/init.c, Src/Zle/compctl.c:  add specifics to error
 	messages explaining failure of "read -c" / "read -l".
 
 	* 32338: Doc/Makefile.in: create Doc/help.txt as an empty file
diff --git a/Src/init.c b/Src/init.c
index bd871cbbd..da2a1bf56 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++) {