zsh-workers
 help / color / mirror / code / Atom feed
* Some other Small display bugs
  1995-07-04 17:12 Small display bug Heading, Anthony
@ 1995-07-04 16:42 ` Peter Kutschera
  1995-07-06 15:11 ` Small display bug P.Stephenson
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Kutschera @ 1995-07-04 16:42 UTC (permalink / raw)
  To: heading_anthony; +Cc: zsh-workers

This happens with 2.6-beta9:

1. Sometimes i get no echo typing after the prompt.
   after typing <esc> or <cr> the text appears. 

2. Often ^Z doesn't work
   example:
    xarchie
    ^Z   
    Here i expect the prompt to enter bg !!

3. We have problems with some xterms: 
   (PROMT="%l %T %m[%h] ")
   if (%h < 10) the displayed prompt is "<some blanks><1 digit>] "
   if (%h > 9)  the displayed prompt seems to work but there is an extra <lf> after!

I hope we have some errors in  ~/.z* .
Any Hints?

Thanks, Peter
Signature: http://zditr1.arcs.ac.at/~peter
------


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

* Small display bug
@ 1995-07-04 17:12 Heading, Anthony
  1995-07-04 16:42 ` Some other Small display bugs Peter Kutschera
  1995-07-06 15:11 ` Small display bug P.Stephenson
  0 siblings, 2 replies; 4+ messages in thread
From: Heading, Anthony @ 1995-07-04 17:12 UTC (permalink / raw)
  To: zsh-workers


A little display problem I've encountered:

Let _ be the cursor

% bindkey -e_

Then hit <esc>-t to transpose words

% -e bindkey_ -e

This has been around for a while (since beta-6 certainly), at least
on SUNos 4.1.3 xterm.

Anthony




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

* Re: Small display bug
  1995-07-04 17:12 Small display bug Heading, Anthony
  1995-07-04 16:42 ` Some other Small display bugs Peter Kutschera
@ 1995-07-06 15:11 ` P.Stephenson
  1995-07-06 16:09   ` P.Stephenson
  1 sibling, 1 reply; 4+ messages in thread
From: P.Stephenson @ 1995-07-06 15:11 UTC (permalink / raw)
  To: Zsh hackers list

heading_anthony@jpmorgan.com wrote:
> 
> A little display problem I've encountered:
> 
> Let _ be the cursor
> 
> % bindkey -e_
> 
> Then hit <esc>-t to transpose words
> 
> % -e bindkey_ -e

The problem is that refreshline() is clever enough to insert a new '-e
' before the bindkey, but doesn't hang around long enough to delete
the final -e.  I think I've seen similar behaviour a number of times,
but this is the first reproducible one.

This fixes it by
1) if it's possible to clear to end of line, do so if the old line
hasn't been used up when the new line is done (this should fix your
problem)
2) otherwise, output some extra spaces (this may be overkill since 1)
should cover most times there's a problem).

Very likely this depends on Zefram's recent zle patches.

*** Src/zle_refresh.c.ceol	Wed Jul  5 14:27:13 1995
--- Src/zle_refresh.c	Thu Jul  6 15:59:29 1995
***************
*** 486,491 ****
--- 486,493 ----
  	if ((j > i + tclen[TCCLEAREOL]) || /* new buf's spaces early enough */
  	    (nllen == winw && nl[winw - 1] == ' '))
  	    col_cleareol = i;
+ 	else
+ 	    col_cleareol = nllen;
      }
  
  /* 3: set character for first column, in case automargin stuff needs doing */
***************
*** 497,503 ****
      /* skip past all matching characters */
  	for (; *nl && (*nl == *ol); nl++, ol++, ccs++) ;
  
! 	if (!*nl)		/* we've finished writing the new line */
  	    return;
  
  	moveto(ln, ccs);	/* move to where we do all output from */
--- 499,505 ----
      /* skip past all matching characters */
  	for (; *nl && (*nl == *ol); nl++, ol++, ccs++) ;
  
! 	if (!*nl && !*ol)	/* we've finished writing the new line */
  	    return;
  
  	moveto(ln, ccs);	/* move to where we do all output from */
***************
*** 506,511 ****
--- 508,522 ----
  	if ((col_cleareol != -1) && (ccs >= col_cleareol)) {
  	    tcout(TCCLEAREOL);
  	    SELECT_ADD_COST(tclen[TCCLEAREOL]);
+ 	    return;
+ 	}
+     /* otherwise, if we've finished the new buffer, dump out enough spaces */
+ 	if (!*nl) {
+ 	    j = strlen(ol);
+ 	    for (i = 0; i < j; i++)
+ 		putc(' ', shout);
+ 	    vcs += j;
+ 	    moveto(ln, ccs);
  	    return;
  	}
  

-- 
Peter Stephenson <P.Stephenson@swansea.ac.uk>  Tel: +44 1792 205678 extn. 4461
WWW:  http://python.swan.ac.uk/~pypeters/      Fax: +44 1792 295324
Department of Physics, University of Wales, Swansea,
Singleton Park, Swansea, SA2 8PP, U.K.


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

* Re: Small display bug
  1995-07-06 15:11 ` Small display bug P.Stephenson
@ 1995-07-06 16:09   ` P.Stephenson
  0 siblings, 0 replies; 4+ messages in thread
From: P.Stephenson @ 1995-07-06 16:09 UTC (permalink / raw)
  To: Zsh hackers list

I wrote:
> > % bindkey -e_
> > 
> > Then hit <esc>-t to transpose words
> > 
> > % -e bindkey_ -e
> 
> This fixes it...

except I forgot to check lines which wraparound the screen... this
version with a couple of extra tests now works O.K. with that.

I'd much prefer a zle_refresh expert to fix this but that department's
been quiet for a while, perhaps they're having to work or something.

There is still a bug when you insert in the middle of a long line over
the line break, but I don't think I've caused that --- at least, to
the best of my knowledge it's the same both before and after this
patch.

Guess who I replied to before I remembered to change it...

*** Src/zle_refresh.c.ceol	Wed Jul  5 14:27:13 1995
--- Src/zle_refresh.c	Thu Jul  6 17:04:01 1995
***************
*** 486,491 ****
--- 486,493 ----
  	if ((j > i + tclen[TCCLEAREOL]) || /* new buf's spaces early enough */
  	    (nllen == winw && nl[winw - 1] == ' '))
  	    col_cleareol = i;
+ 	else if (nllen < winw)
+ 	    col_cleareol = nllen;
      }
  
  /* 3: set character for first column, in case automargin stuff needs doing */
***************
*** 497,504 ****
      /* skip past all matching characters */
  	for (; *nl && (*nl == *ol); nl++, ol++, ccs++) ;
  
! 	if (!*nl)		/* we've finished writing the new line */
! 	    return;
  
  	moveto(ln, ccs);	/* move to where we do all output from */
  
--- 499,506 ----
      /* skip past all matching characters */
  	for (; *nl && (*nl == *ol); nl++, ol++, ccs++) ;
  
! 	if ((!*nl && !*ol) || ccs >= winw)
! 	    return;		/* we've finished writing the new line */
  
  	moveto(ln, ccs);	/* move to where we do all output from */
  
***************
*** 506,511 ****
--- 508,522 ----
  	if ((col_cleareol != -1) && (ccs >= col_cleareol)) {
  	    tcout(TCCLEAREOL);
  	    SELECT_ADD_COST(tclen[TCCLEAREOL]);
+ 	    return;
+ 	}
+     /* otherwise, if we've finished the new buffer, dump out enough spaces */
+ 	if (!*nl) {
+ 	    j = strlen(ol);
+ 	    for (i = 0; i < j; i++)
+ 		putc(' ', shout);
+ 	    vcs += j;
+ 	    moveto(ln, ccs);
  	    return;
  	}
  

-- 
Peter Stephenson <P.Stephenson@swansea.ac.uk>  Tel: +44 1792 205678 extn. 4461
WWW:  http://python.swan.ac.uk/~pypeters/      Fax: +44 1792 295324
Department of Physics, University of Wales, Swansea,
Singleton Park, Swansea, SA2 8PP, U.K.


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

end of thread, other threads:[~1995-07-06 16:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-07-04 17:12 Small display bug Heading, Anthony
1995-07-04 16:42 ` Some other Small display bugs Peter Kutschera
1995-07-06 15:11 ` Small display bug P.Stephenson
1995-07-06 16:09   ` P.Stephenson

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