zsh-workers
 help / color / mirror / code / Atom feed
* [bug] completion makes input jump up one line
@ 2004-02-14  0:56 Mikael Magnusson
  2004-02-27  0:32 ` Geoff Wing
  0 siblings, 1 reply; 8+ messages in thread
From: Mikael Magnusson @ 2004-02-14  0:56 UTC (permalink / raw)
  To: zsh-workers; +Cc: Mikael Magnusson

under 4.1, if i tabcomplete, and one of the matches in the list is a 
multiple of $COLUMNS, ie, if the last letter of the match is in the 
rightmost column, the whole thing jumps up one line. i confirmed it with 
caphuso on #zsh, it happens in 4.1, but not 4.0
here is a "screenshot":
_______________________________________________________________________
|{1:53:24:~/dl/oc}6% rm Destiny <cursor ends up here>                 |
|{1:53:24:~/dl/oc}6% rm Destiny                                       |
|Destiny\ -\ Star\ Ocean\ 2\ The\ Second\ Story\ -\ Frozen\ Dreams.mp3|
|Destiny,\ OverCoat\ -\ Seiken\ Densetsu\ 3\ -\ Angels\ Dear\ \(Vocal\|
|).mp3                                                                |
|Destiny,\ zyko\ -\ Chrono\ Cross\ -\ Dragon\'s\ Prayer\ The\ Blackene|
|d\ Desire.mp3                                                        |
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

--
Mikael Magnusson

Ps, cc replies to me as i'm not on the list


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

* Re: [bug] completion makes input jump up one line
  2004-02-14  0:56 [bug] completion makes input jump up one line Mikael Magnusson
@ 2004-02-27  0:32 ` Geoff Wing
  2004-02-27  1:09   ` Geoff Wing
  0 siblings, 1 reply; 8+ messages in thread
From: Geoff Wing @ 2004-02-27  0:32 UTC (permalink / raw)
  To: zsh-workers

Mikael Magnusson <mangosoft@comhem.se> typed:
: under 4.1, if i tabcomplete, and one of the matches in the list is a=20
: multiple of $COLUMNS, ie, if the last letter of the match is in the=20
: rightmost column, the whole thing jumps up one line. i confirmed it with=20
: caphuso on #zsh, it happens in 4.1, but not 4.0

I can reproduce this with:
 % zsh -f
 % setopt alwayslastprompt

I'm guessing the calculation in calclist() needs correction.

Geoff


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

* Re: [bug] completion makes input jump up one line
  2004-02-27  0:32 ` Geoff Wing
@ 2004-02-27  1:09   ` Geoff Wing
  2004-02-27  2:08     ` Bart Schaefer
  0 siblings, 1 reply; 8+ messages in thread
From: Geoff Wing @ 2004-02-27  1:09 UTC (permalink / raw)
  To: zsh-workers

Geoff Wing <mason@primenet.com.au> typed:
: Mikael Magnusson <mangosoft@comhem.se> typed:
:: under 4.1, if i tabcomplete, and one of the matches in the list is a=20
:: multiple of $COLUMNS, ie, if the last letter of the match is in the=20
:: rightmost column, the whole thing jumps up one line. i confirmed it with=20
:: caphuso on #zsh, it happens in 4.1, but not 4.0
:
: I can reproduce this with:
:  % zsh -f
:  % setopt alwayslastprompt
: I'm guessing the calculation in calclist() needs correction.

Does this look right?

--- Zle/compresult.c	6 Feb 2003 10:29:34 -0000	1.48
+++ Zle/compresult.c	27 Feb 2004 01:02:01 -0000
@@ -1573,10 +1573,10 @@
 			if (!(m->flags & CMF_HIDE)) {
 			    if (m->disp) {
 				if (!(m->flags & CMF_DISPLINE))
-				    glines += 1 + (mlens[m->gnum] / columns);
+				    glines += 1 + ((mlens[m->gnum] - 1) / columns);
 			    } else if (showall ||
 				       !(m->flags & (CMF_NOLIST | CMF_MULT)))
-				glines += 1 + ((mlens[m->gnum]) / columns);
+				glines += 1 + (((mlens[m->gnum]) - 1) / columns);
 			}
 		}
 	    }


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

* Re: [bug] completion makes input jump up one line
  2004-02-27  1:09   ` Geoff Wing
@ 2004-02-27  2:08     ` Bart Schaefer
  2004-03-01  2:50       ` Geoff Wing
  0 siblings, 1 reply; 8+ messages in thread
From: Bart Schaefer @ 2004-02-27  2:08 UTC (permalink / raw)
  To: zsh-workers

On Feb 27,  1:09am, Geoff Wing wrote:
} 
} Does this look right?

Oops, that's what I get for starting to reply to email before all of it
has downloaded.

Your patch _looks_ right ... but wasn't something like this fixed at
least once before?  Do we have any idea how it got broken again?


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

* Re: [bug] completion makes input jump up one line
  2004-02-27  2:08     ` Bart Schaefer
@ 2004-03-01  2:50       ` Geoff Wing
  2004-03-04  0:23         ` Geoff Wing
  0 siblings, 1 reply; 8+ messages in thread
From: Geoff Wing @ 2004-03-01  2:50 UTC (permalink / raw)
  To: zsh-workers

Bart Schaefer <schaefer@brasslantern.com> typed:
:On Feb 27,  1:09am, Geoff Wing wrote:
:} Does this look right?
:Your patch _looks_ right ... but wasn't something like this fixed at
:least once before?  Do we have any idea how it got broken again?

Hmm, I don't remember any similar problem nor can I find a description
of one.  Anyone else have an idea about this?

Regards,
Geoff


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

* Re: [bug] completion makes input jump up one line
  2004-03-01  2:50       ` Geoff Wing
@ 2004-03-04  0:23         ` Geoff Wing
  0 siblings, 0 replies; 8+ messages in thread
From: Geoff Wing @ 2004-03-04  0:23 UTC (permalink / raw)
  To: zsh-workers

Geoff Wing <gcw@zsh.org> typed:
:Hmm, I don't remember any similar problem nor can I find a description
:of one.  Anyone else have an idea about this?

Unless there are objections (or more clarification), I'll commit the patch
in workers/19474 before zsh-4.2.0

Regards,
Geoff


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

* Re: [bug] completion makes input jump up one line
  2004-03-09 14:58 Borzenkov Andrey
@ 2004-03-09 15:35 ` Bart Schaefer
  0 siblings, 0 replies; 8+ messages in thread
From: Bart Schaefer @ 2004-03-09 15:35 UTC (permalink / raw)
  To: 'zsh-workers@sunsite.dk'

On Mar 9,  5:58pm, Borzenkov Andrey wrote:
}
} > Your patch _looks_ right ... but wasn't something like this fixed at
} > least once before?  Do we have any idea how it got broken again?
} 
} Do you mean this one? http://www.zsh.org/mla/workers//2003/msg00344.html

No, I was pretty sure there was a previous bug that occurred only when a
line displayed by zsh was exactly the width of the terminal.  It may have
been in a different part of the code, but I thought it was in completion
listings.  Maybe I'm hallucinating; I don't know what keywords to try to
search for it.  I may be thinking of the threads around zsh-workers/7053
and zsh-workers/7030.


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

* RE: [bug] completion makes input jump up one line
@ 2004-03-09 14:58 Borzenkov Andrey
  2004-03-09 15:35 ` Bart Schaefer
  0 siblings, 1 reply; 8+ messages in thread
From: Borzenkov Andrey @ 2004-03-09 14:58 UTC (permalink / raw)
  To: 'Bart Schaefer', 'zsh-workers@sunsite.dk'



> -----Original Message-----
> From: Bart Schaefer [mailto:schaefer@brasslantern.com]
> Sent: Friday, February 27, 2004 5:09 AM
> To: zsh-workers@sunsite.dk
> Subject: Re: [bug] completion makes input jump up one line
> 
> On Feb 27,  1:09am, Geoff Wing wrote:
> }
> } Does this look right?
> 
> Oops, that's what I get for starting to reply to email before all of it
> has downloaded.
> 
> Your patch _looks_ right ... but wasn't something like this fixed at
> least once before?  Do we have any idea how it got broken again?

Do you mean this one? http://www.zsh.org/mla/workers//2003/msg00344.html It
was different at first glance.

-andrey


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

end of thread, other threads:[~2004-03-09 15:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-14  0:56 [bug] completion makes input jump up one line Mikael Magnusson
2004-02-27  0:32 ` Geoff Wing
2004-02-27  1:09   ` Geoff Wing
2004-02-27  2:08     ` Bart Schaefer
2004-03-01  2:50       ` Geoff Wing
2004-03-04  0:23         ` Geoff Wing
2004-03-09 14:58 Borzenkov Andrey
2004-03-09 15:35 ` Bart Schaefer

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