From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27079 invoked by alias); 2 Feb 2014 21:58:51 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 32341 Received: (qmail 24704 invoked from network); 2 Feb 2014 21:58:35 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <140202135837.ZM15483@torch.brasslantern.com> Date: Sun, 02 Feb 2014 13:58:37 -0800 X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Pre-5.0.5 part 3: Heuristic for ZLE_RPROMPT_INDENT MIME-version: 1.0 Content-type: text/plain; charset=us-ascii 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++) {