zsh-workers
 help / color / mirror / code / Atom feed
* Weird behaviour with certain PS1-sequences
@ 1999-09-27 19:14 Juhapekka Tolvanen
  1999-09-27 19:57 ` Bart Schaefer
  0 siblings, 1 reply; 7+ messages in thread
From: Juhapekka Tolvanen @ 1999-09-27 19:14 UTC (permalink / raw)
  To: zsh-workers


I downloaded zsh-3.1.6 and compiled it in Sun Solaris 2.6

juhtolv@tukki:~/src/zsh-3.1.6/Util$ uname -a
SunOS tukki 5.7 Generic_106541-04 sun4u sparc SUNW,Ultra-2

If I have this in .zshrc or give this in command line, shell goes to endless
loop. Terminal is all blank and Ctrl-c and Ctrl-z does not help at all.

export PS1='%h|%l|%n@%m:%/ %# '

But this works fine:

export PS1='%h|%l|%n@%m:%/%# '



-- Juhapekka "naula" Tolvanen *  U of Jyväskylä * juhtolv@st.jyu.fi --
-- http://www.cc.jyu.fi/~juhtolv/ * * " STRAIGHT BUT NOT NARROW ! " --
----------------------------------------------------------------------
" Varför måste vi bo i fucking jävla kuk-Åmål? "


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Weird behaviour with certain PS1-sequences
  1999-09-27 19:14 Weird behaviour with certain PS1-sequences Juhapekka Tolvanen
@ 1999-09-27 19:57 ` Bart Schaefer
  1999-09-27 20:03   ` Juhapekka Tolvanen
  1999-09-27 22:06   ` Dan Nelson
  0 siblings, 2 replies; 7+ messages in thread
From: Bart Schaefer @ 1999-09-27 19:57 UTC (permalink / raw)
  To: Juhapekka Tolvanen, zsh-workers

On Sep 27, 10:14pm, Juhapekka Tolvanen wrote:
> Subject: Weird behaviour with certain PS1-sequences
> 
> If I have this in .zshrc or give this in command line, shell goes to endless
> loop. Terminal is all blank and Ctrl-c and Ctrl-z does not help at all.
> 
> export PS1='%h|%l|%n@%m:%/ %# '

I can't reproduce this on Linux.  I've tried various prompt-related setopts
with no change in the behavior.

Please tell us more about your configuration.

> But this works fine:
> 
> export PS1='%h|%l|%n@%m:%/%# '

What does the prompt look like in that case?


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Weird behaviour with certain PS1-sequences
  1999-09-27 19:57 ` Bart Schaefer
@ 1999-09-27 20:03   ` Juhapekka Tolvanen
  1999-09-27 22:06   ` Dan Nelson
  1 sibling, 0 replies; 7+ messages in thread
From: Juhapekka Tolvanen @ 1999-09-27 20:03 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-workers

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1061 bytes --]

On Mon, 27 Sep 1999, Bart Schaefer wrote:

> On Sep 27, 10:14pm, Juhapekka Tolvanen wrote:
> > Subject: Weird behaviour with certain PS1-sequences
> > 
> > If I have this in .zshrc or give this in command line, shell goes to endless
> > loop. Terminal is all blank and Ctrl-c and Ctrl-z does not help at all.
> > 
> > export PS1='%h|%l|%n@%m:%/ %# '
> 
> I can't reproduce this on Linux.  I've tried various prompt-related setopts
> with no change in the behavior.
> 
> Please tell us more about your configuration.

Output of reporter-script comes as an attachment.
 
> > But this works fine:
> > 
> > export PS1='%h|%l|%n@%m:%/%# '
> 
> What does the prompt look like in that case?

tukki% export PS1='%h|%l|%n@%m:%/%# '
2|pts/34|juhtolv@tukki:/home/juhtolv% 

"tukki" is name of the computer.
 

-- Juhapekka "naula" Tolvanen *  U of Jyväskylä * juhtolv@st.jyu.fi --
-- http://www.cc.jyu.fi/~juhtolv/ * * " STRAIGHT BUT NOT NARROW ! " --
----------------------------------------------------------------------
" Varför måste vi bo i fucking jävla kuk-Åmål? "

[-- Attachment #2: Type: TEXT/PLAIN, Size: 9947 bytes --]

# START zsh saveset
# uname:  SunOS tukki 5.7 Generic_106541-04 sun4u sparc SUNW,Ultra-2

# Aliases.

alias run-help=man
alias which-command=whence

# Key bindings.

bindkey -N .safe
bindkey -N emacs
bindkey -N main
bindkey -N vicmd
bindkey -N viins

bindkey -R -M .safe "^@"-"^I" self-insert
bindkey -M .safe "^J" accept-line
bindkey -R -M .safe "^K"-"^L" self-insert
bindkey -M .safe "^M" accept-line
bindkey -R -M .safe "^N"-"\M-^?" self-insert

bindkey -M emacs "^@" set-mark-command
bindkey -M emacs "^A" beginning-of-line
bindkey -M emacs "^B" backward-char
bindkey -M emacs "^D" delete-char-or-list
bindkey -M emacs "^E" end-of-line
bindkey -M emacs "^F" forward-char
bindkey -M emacs "^G" send-break
bindkey -M emacs "^H" backward-delete-char
bindkey -M emacs "^I" expand-or-complete
bindkey -M emacs "^J" accept-line
bindkey -M emacs "^K" kill-line
bindkey -M emacs "^L" clear-screen
bindkey -M emacs "^M" accept-line
bindkey -M emacs "^N" down-line-or-history
bindkey -M emacs "^O" accept-line-and-down-history
bindkey -M emacs "^P" up-line-or-history
bindkey -M emacs "^Q" push-line
bindkey -M emacs "^R" history-incremental-search-backward
bindkey -M emacs "^S" history-incremental-search-forward
bindkey -M emacs "^T" transpose-chars
bindkey -M emacs "^U" kill-whole-line
bindkey -M emacs "^V" quoted-insert
bindkey -M emacs "^W" backward-kill-word
bindkey -M emacs "^X^B" vi-match-bracket
bindkey -M emacs "^X^F" vi-find-next-char
bindkey -M emacs "^X^J" vi-join
bindkey -M emacs "^X^K" kill-buffer
bindkey -M emacs "^X^N" infer-next-history
bindkey -M emacs "^X^O" overwrite-mode
bindkey -M emacs "^X^U" undo
bindkey -M emacs "^X^V" vi-cmd-mode
bindkey -M emacs "^X^X" exchange-point-and-mark
bindkey -M emacs "^X*" expand-word
bindkey -M emacs "^X=" what-cursor-position
bindkey -M emacs "^XG" list-expand
bindkey -M emacs "^Xg" list-expand
bindkey -M emacs "^Xr" history-incremental-search-backward
bindkey -M emacs "^Xs" history-incremental-search-forward
bindkey -M emacs "^Xu" undo
bindkey -M emacs "^Y" yank
bindkey -M emacs "^[^D" list-choices
bindkey -M emacs "^[^G" send-break
bindkey -M emacs "^[^H" backward-kill-word
bindkey -M emacs "^[^I" self-insert-unmeta
bindkey -M emacs "^[^J" self-insert-unmeta
bindkey -M emacs "^[^L" clear-screen
bindkey -M emacs "^[^M" self-insert-unmeta
bindkey -M emacs "^[^_" copy-prev-word
bindkey -M emacs "^[ " expand-history
bindkey -M emacs "^[!" expand-history
bindkey -M emacs "^[\"" quote-region
bindkey -M emacs "^[\$" spell-word
bindkey -M emacs "^['" quote-line
bindkey -M emacs "^[-" neg-argument
bindkey -M emacs "^[." insert-last-word
bindkey -M emacs "^[0" digit-argument
bindkey -M emacs "^[1" digit-argument
bindkey -M emacs "^[2" digit-argument
bindkey -M emacs "^[3" digit-argument
bindkey -M emacs "^[4" digit-argument
bindkey -M emacs "^[5" digit-argument
bindkey -M emacs "^[6" digit-argument
bindkey -M emacs "^[7" digit-argument
bindkey -M emacs "^[8" digit-argument
bindkey -M emacs "^[9" digit-argument
bindkey -M emacs "^[<" beginning-of-buffer-or-history
bindkey -M emacs "^[>" end-of-buffer-or-history
bindkey -M emacs "^[?" which-command
bindkey -M emacs "^[A" accept-and-hold
bindkey -M emacs "^[B" backward-word
bindkey -M emacs "^[C" capitalize-word
bindkey -M emacs "^[D" kill-word
bindkey -M emacs "^[F" forward-word
bindkey -M emacs "^[G" get-line
bindkey -M emacs "^[H" run-help
bindkey -M emacs "^[L" down-case-word
bindkey -M emacs "^[N" history-search-forward
bindkey -M emacs "^[OA" up-line-or-history
bindkey -M emacs "^[OB" down-line-or-history
bindkey -M emacs "^[OC" forward-char
bindkey -M emacs "^[OD" backward-char
bindkey -M emacs "^[P" history-search-backward
bindkey -M emacs "^[Q" push-line
bindkey -M emacs "^[S" spell-word
bindkey -M emacs "^[T" transpose-words
bindkey -M emacs "^[U" up-case-word
bindkey -M emacs "^[W" copy-region-as-kill
bindkey -M emacs "^[[A" up-line-or-history
bindkey -M emacs "^[[B" down-line-or-history
bindkey -M emacs "^[[C" forward-char
bindkey -M emacs "^[[D" backward-char
bindkey -M emacs "^[_" insert-last-word
bindkey -M emacs "^[a" accept-and-hold
bindkey -M emacs "^[b" backward-word
bindkey -M emacs "^[c" capitalize-word
bindkey -M emacs "^[d" kill-word
bindkey -M emacs "^[f" forward-word
bindkey -M emacs "^[g" get-line
bindkey -M emacs "^[h" run-help
bindkey -M emacs "^[l" down-case-word
bindkey -M emacs "^[n" history-search-forward
bindkey -M emacs "^[p" history-search-backward
bindkey -M emacs "^[q" push-line
bindkey -M emacs "^[s" spell-word
bindkey -M emacs "^[t" transpose-words
bindkey -M emacs "^[u" up-case-word
bindkey -M emacs "^[w" copy-region-as-kill
bindkey -M emacs "^[x" execute-named-cmd
bindkey -M emacs "^[y" yank-pop
bindkey -M emacs "^[z" execute-last-named-cmd
bindkey -M emacs "^[|" vi-goto-column
bindkey -M emacs "^[^?" backward-kill-word
bindkey -M emacs "^_" undo
bindkey -R -M emacs " "-"~" self-insert
bindkey -M emacs "^?" backward-delete-char
bindkey -R -M emacs "\M-^@"-"\M-^?" self-insert

bindkey -R "^A"-"^C" self-insert
bindkey "^D" list-choices
bindkey -R "^E"-"^F" self-insert
bindkey "^G" list-expand
bindkey "^H" vi-backward-delete-char
bindkey "^I" expand-or-complete
bindkey "^J" accept-line
bindkey "^K" self-insert
bindkey "^L" clear-screen
bindkey "^M" accept-line
bindkey -R "^N"-"^P" self-insert
bindkey "^Q" vi-quoted-insert
bindkey "^R" redisplay
bindkey -R "^S"-"^T" self-insert
bindkey "^U" vi-kill-line
bindkey "^V" vi-quoted-insert
bindkey "^W" vi-backward-kill-word
bindkey -R "^X"-"^Z" self-insert
bindkey "^[" vi-cmd-mode
bindkey -R "^\\\\"-"~" self-insert
bindkey "^?" vi-backward-delete-char
bindkey -R "\M-^@"-"\M-^?" self-insert

bindkey -a "^D" list-choices
bindkey -a "^G" list-expand
bindkey -a "^H" vi-backward-char
bindkey -a "^J" accept-line
bindkey -a "^L" clear-screen
bindkey -a "^M" accept-line
bindkey -a "^N" down-history
bindkey -a "^P" up-history
bindkey -a "^R" redisplay
bindkey -a "^[OA" up-line-or-history
bindkey -a "^[OB" down-line-or-history
bindkey -a "^[OC" vi-forward-char
bindkey -a "^[OD" vi-backward-char
bindkey -a "^[[A" up-line-or-history
bindkey -a "^[[B" down-line-or-history
bindkey -a "^[[C" vi-forward-char
bindkey -a "^[[D" vi-backward-char
bindkey -a " " vi-forward-char
bindkey -a "\"" vi-set-buffer
bindkey -a "#" pound-insert
bindkey -a "\$" vi-end-of-line
bindkey -a "%" vi-match-bracket
bindkey -a "'" vi-goto-mark-line
bindkey -a "+" vi-down-line-or-history
bindkey -a "," vi-rev-repeat-find
bindkey -a -- "-" vi-up-line-or-history
bindkey -a "." vi-repeat-change
bindkey -a "/" vi-history-search-backward
bindkey -a "0" vi-digit-or-beginning-of-line
bindkey -R -a "1"-"9" digit-argument
bindkey -a ";" vi-repeat-find
bindkey -a "<" vi-unindent
bindkey -a "=" list-choices
bindkey -a ">" vi-indent
bindkey -a "?" vi-history-search-forward
bindkey -a "A" vi-add-eol
bindkey -a "B" vi-backward-blank-word
bindkey -a "C" vi-change-eol
bindkey -a "D" vi-kill-eol
bindkey -a "E" vi-forward-blank-word-end
bindkey -a "F" vi-find-prev-char
bindkey -a "G" vi-fetch-history
bindkey -a "I" vi-insert-bol
bindkey -a "J" vi-join
bindkey -a "N" vi-rev-repeat-search
bindkey -a "O" vi-open-line-above
bindkey -a "P" vi-put-before
bindkey -a "R" vi-replace
bindkey -a "S" vi-change-whole-line
bindkey -a "T" vi-find-prev-char-skip
bindkey -a "W" vi-forward-blank-word
bindkey -a "X" vi-backward-delete-char
bindkey -a "Y" vi-yank-whole-line
bindkey -a "\^" vi-first-non-blank
bindkey -a "\`" vi-goto-mark
bindkey -a "a" vi-add-next
bindkey -a "b" vi-backward-word
bindkey -a "c" vi-change
bindkey -a "d" vi-delete
bindkey -a "e" vi-forward-word-end
bindkey -a "f" vi-find-next-char
bindkey -a "h" vi-backward-char
bindkey -a "i" vi-insert
bindkey -a "j" down-line-or-history
bindkey -a "k" up-line-or-history
bindkey -a "l" vi-forward-char
bindkey -a "m" vi-set-mark
bindkey -a "n" vi-repeat-search
bindkey -a "o" vi-open-line-below
bindkey -a "p" vi-put-after
bindkey -a "r" vi-replace-chars
bindkey -a "s" vi-substitute
bindkey -a "t" vi-find-next-char-skip
bindkey -a "u" vi-undo-change
bindkey -a "w" vi-forward-word
bindkey -a "x" vi-delete-char
bindkey -a "y" vi-yank
bindkey -a "|" vi-goto-column
bindkey -a "~" vi-swap-case
bindkey -a "^?" vi-backward-char

bindkey -R -M viins "^A"-"^C" self-insert
bindkey -M viins "^D" list-choices
bindkey -R -M viins "^E"-"^F" self-insert
bindkey -M viins "^G" list-expand
bindkey -M viins "^H" vi-backward-delete-char
bindkey -M viins "^I" expand-or-complete
bindkey -M viins "^J" accept-line
bindkey -M viins "^K" self-insert
bindkey -M viins "^L" clear-screen
bindkey -M viins "^M" accept-line
bindkey -R -M viins "^N"-"^P" self-insert
bindkey -M viins "^Q" vi-quoted-insert
bindkey -M viins "^R" redisplay
bindkey -R -M viins "^S"-"^T" self-insert
bindkey -M viins "^U" vi-kill-line
bindkey -M viins "^V" vi-quoted-insert
bindkey -M viins "^W" vi-backward-kill-word
bindkey -R -M viins "^X"-"^Z" self-insert
bindkey -M viins "^[" vi-cmd-mode
bindkey -R -M viins "^\\\\"-"~" self-insert
bindkey -M viins "^?" vi-backward-delete-char
bindkey -R -M viins "\M-^@"-"\M-^?" self-insert

# Completions.

compctl -C -c -tn
compctl -D -f -tn
compctl -T

# Undefined functions.


# Defined functions.


# Limits.

limit stacksize       8MB
limit coredumpsize    976MB
limit descriptors     64

# Modules.

zmodload -d zle comp1
zmodload -d compctl comp1
zmodload -d complist comp1 zle

zmodload -ab sched



zmodload zle
zmodload compctl
zmodload comp1
zmodload rlimits

# Non-array variables.

TERMCAP=''
TERM='xterm'
prompt='test%'

# Array variables.

argv=()

# Exported variables.

export TERMCAP
export TERM

# Setopt.


# END zsh saveset

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Weird behaviour with certain PS1-sequences
  1999-09-27 19:57 ` Bart Schaefer
  1999-09-27 20:03   ` Juhapekka Tolvanen
@ 1999-09-27 22:06   ` Dan Nelson
  1999-09-28  8:54     ` Peter Stephenson
  1 sibling, 1 reply; 7+ messages in thread
From: Dan Nelson @ 1999-09-27 22:06 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: Juhapekka Tolvanen, zsh-workers

In the last episode (Sep 27), Bart Schaefer said:
> On Sep 27, 10:14pm, Juhapekka Tolvanen wrote:
> > If I have this in .zshrc or give this in command line, shell goes
> > to endless loop. Terminal is all blank and Ctrl-c and Ctrl-z does
> > not help at all.
> > 
> > export PS1='%h|%l|%n@%m:%/ %# '
> 
> I can't reproduce this on Linux.  I've tried various prompt-related
> setopts with no change in the behavior.

I can reproduce this easily with zsh 3.0.6 or 3.1.6 on FreeBSD (2.2.6
and 4.0).  The TERM variable has to be set to a 'dumb'-style terminal,
or blank.  I thought I could reproduce it on Solaris 2.6 but it doesn't
seem to be cooperating right now.

% zsh -f
% PROMPT="%m %n %/ %%"
dan dan /home/dan % TERM=dumb
dan dan /home/dan % 
                    ^ blanks start here and don't stop

Oddly enough, "%m%n%/" doesn't trigger the bug. "%m  %n" does. "%m %n"
does not.

Termcap entry for 'dumb':

dumb|un|unknown:am:co#80:do=^J:

-- 
	Dan Nelson
	dnelson@emsphone.com


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Weird behaviour with certain PS1-sequences
  1999-09-27 22:06   ` Dan Nelson
@ 1999-09-28  8:54     ` Peter Stephenson
  1999-10-03  8:15       ` PATCH: 3.1.6: promptexpand (Re: Weird behaviour with certain PS1-sequences) Bart Schaefer
  1999-10-03  9:04       ` PATCH: 3.1.6* (Was: " Geoff Wing
  0 siblings, 2 replies; 7+ messages in thread
From: Peter Stephenson @ 1999-09-28  8:54 UTC (permalink / raw)
  To: Zsh hackers list

Dan Nelson wrote:
> % zsh -f
> % PROMPT="%m %n %/ %%"
> dan dan /home/dan % TERM=dumb
> dan dan /home/dan % 
>                     ^ blanks start here and don't stop

Yes, I can see this, and what's going wrong, in the refresh code.
Unfortunately I'm not sure I understand the logic well enough to fix it,
though if Geoff doesn't get around to it I will have to try.

The spaces in the prompt match what is on the line already at that point,
i.e. nothing.  singmoveto() is called to skip over them, one by one.
(Since we're skipping only one character in this example, it would
presumably be more efficient just to output it, but that's a different
question.)  singmoveto() correctly finds out that we need to move one
character to the right, and calls tc_rightcurs() to do this.  Here, all the
easy things you can do with proper terminals fail, and it gets down to the
code currently around line 948 for dumb terminals.

This is where all hell breaks loose.  For reasons I am totally at a loss to
understand, if we are printing in the prompt, as we currently are, the code
assumes we can just write out the entire rest of the prompt, then fix the
position up after.  But, obviously, in this case fixing up after means
skipping back over all the unnecessary characters we've just printed to get
where we were.  The code correctly counts the offset we need to fix up the
position, but it's minus something because we're way past.  The remainder
of tc_rightcurs() assumes this offset (ct) is positive and tries to output
spaces to match, which puts it into a loop eternally decrementing ct, at
least until it wraps round after 4,000,000,000 or so.

The obvious simple fix is to write out only the bit of the prompt we need
to advance to the right position.  But I don't understand why it's the way
it is at the moment, so I'd better not try to rewrite it myself.

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


^ permalink raw reply	[flat|nested] 7+ messages in thread

* PATCH: 3.1.6: promptexpand (Re: Weird behaviour with certain PS1-sequences)
  1999-09-28  8:54     ` Peter Stephenson
@ 1999-10-03  8:15       ` Bart Schaefer
  1999-10-03  9:04       ` PATCH: 3.1.6* (Was: " Geoff Wing
  1 sibling, 0 replies; 7+ messages in thread
From: Bart Schaefer @ 1999-10-03  8:15 UTC (permalink / raw)
  To: Zsh hackers list

On Sep 28, 10:54am, Peter Stephenson wrote:
} Subject: Re: Weird behaviour with certain PS1-sequences
}
} Dan Nelson wrote:
} > % zsh -f
} > % PROMPT="%m %n %/ %%"
} > dan dan /home/dan % TERM=dumb
} > dan dan /home/dan % 
} >                     ^ blanks start here and don't stop
} 
} Yes, I can see this, and what's going wrong, in the refresh code.
} Unfortunately I'm not sure I understand the logic well enough to fix it,
} though if Geoff doesn't get around to it I will have to try.

I was looking at this because 3.0.6 has the same bug, and I can't figure
out what Geoff thinks is happening either.  There doesn't seem to ever be
any reason to output more than `ct' characters unless you're reprinting
from the beginning of the line (which is what the block lower down does,
but after sending a '\r').

However, while experimenting with forcing zsh to take all three branches
of that code, I discovered that there's a bug in promptexpand() when the
%{...%} construct is used -- it leaves garbage characters in the string
beyond the end of the prompt.  The following should take care of it.

This reminds me, though, that a while back somebody noticed that zalloc()
called calloc() rather than malloc() and "fixed" it.  I wonder if there
are other bugs lurking around because callers of zalloc() assume that they
are getting a zero'd buffer?

Index: Src/prompt.c
===================================================================
@@ -161,7 +161,7 @@
     rstring = rs;
     Rstring = Rs;
     fm = s;
-    bp = bufline = buf = zalloc(bufspc = 256);
+    bp = bufline = buf = zcalloc(bufspc = 256);
     bp1 = NULL;
     trunclen = 0;
     putpromptchar(1, '\0');

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


^ permalink raw reply	[flat|nested] 7+ messages in thread

* PATCH: 3.1.6* (Was: Weird behaviour with certain PS1-sequences)
  1999-09-28  8:54     ` Peter Stephenson
  1999-10-03  8:15       ` PATCH: 3.1.6: promptexpand (Re: Weird behaviour with certain PS1-sequences) Bart Schaefer
@ 1999-10-03  9:04       ` Geoff Wing
  1 sibling, 0 replies; 7+ messages in thread
From: Geoff Wing @ 1999-10-03  9:04 UTC (permalink / raw)
  To: zsh-workers

Peter Stephenson <pws@ibmth.df.unipi.it> typed:
:Dan Nelson wrote:
:> % zsh -f
:> % PROMPT="%m %n %/ %%"
:> dan dan /home/dan % TERM=dumb
:> dan dan /home/dan % 
:>                     ^ blanks start here and don't stop
:
:Yes, I can see this, and what's going wrong, in the refresh code.
:Unfortunately I'm not sure I understand the logic well enough to fix it,
:though if Geoff doesn't get around to it I will have to try.
:
:The spaces in the prompt match what is on the line already at that point,
:i.e. nothing.  singmoveto() is called to skip over them, one by one.
:(Since we're skipping only one character in this example, it would
:presumably be more efficient just to output it, but that's a different
:question.) 

The problem is that if we're in singlerefresh() mode then we don't use
the normal prompt anyway.  Since we're using a different prompt we can't
do prompt writing in tc_rightcurs().

--- Src/Zle/zle_refresh.c.org	Thu Jul 15 18:27:59 1999
+++ Src/Zle/zle_refresh.c	Sun Oct  3 18:48:00 1999
@@ -945,7 +945,7 @@
 /* otherwise _carefully_ write the contents of the video buffer.
    if we're anywhere in the prompt, goto the left column and write the whole
    prompt out unless ztrlen(lpromptbuf) == lpromptw : we can cheat then */
-    if (vln == 0 && i < lpromptw) {
+    if (vln == 0 && i < lpromptw && !(termflags & TERM_SHORT)) {
 	if (strlen(lpromptbuf) == lpromptw)
 	    fputs(lpromptbuf + i, shout);
 	else if (tccan(TCRIGHT) && (tclen[TCRIGHT] * ct <= ztrlen(lpromptbuf)))


-- 
Geoff Wing : <gcw@pobox.com>     Work URL: http://www.primenet.com.au/
Rxvt Stuff : <gcw@rxvt.org>      Ego URL : http://pobox.com/~gcw/
Zsh Stuff  : <gcw@zsh.org>       Phone   : (Australia) 0413 431 874


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1999-10-03  9:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-27 19:14 Weird behaviour with certain PS1-sequences Juhapekka Tolvanen
1999-09-27 19:57 ` Bart Schaefer
1999-09-27 20:03   ` Juhapekka Tolvanen
1999-09-27 22:06   ` Dan Nelson
1999-09-28  8:54     ` Peter Stephenson
1999-10-03  8:15       ` PATCH: 3.1.6: promptexpand (Re: Weird behaviour with certain PS1-sequences) Bart Schaefer
1999-10-03  9:04       ` PATCH: 3.1.6* (Was: " Geoff Wing

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).