zsh-workers
 help / color / mirror / code / Atom feed
From: Clint Adams <schizo@debian.org>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: line count imprecision in calclist()
Date: Sun, 7 Nov 1999 22:09:50 -0500	[thread overview]
Message-ID: <19991107220950.A21153@dman.com> (raw)

To recreate, run zsh -f in an 80x24, compctl (to load completion modules),
and then the following:

mkdir -p /tmp/xxxxx/yyy/zzzzz
cd /tmp/xxxxx/yyy/zzzzz
touch aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
touch bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
touch cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
touch ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
touch eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
touch fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
touch gggg
touch hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
touch iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
touch jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
touch kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
touch lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
touch mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
mkdir ppppppp


You should now have a situation wherein you can type

ls /tmp/xxxxx/yyy/zzzzz/<TAB>

and find your cursor a line too high.  Behavior is normal if no scrolling
occurs.  If you rename the i+ file to something two characters shorter,
the cursor will be two lines too high.

It seems to have something to do with
 	glines += 1 + ((1 + mlens[m->gnum]) / columns);
in calclist() when mlens[m->gnum] is 79 (and therefore glines += 2).


This seems to correct the problem..

--- compresult.c        1999/11/05 09:10:44     1.1.1.3
+++ compresult.c        1999/11/08 03:05:58
@@ -1287,7 +1287,7 @@
                                if (!(m->flags & CMF_DISPLINE))
                                    glines += 1 + (mlens[m->gnum] / columns);
                            } else if (!(m->flags & CMF_NOLIST))
-                               glines += 1 + ((1 + mlens[m->gnum]) / columns);
+                               glines += 1 + ((mlens[m->gnum]) / columns);
                        }
                }
            }

However, it makes me uneasy that something will break elsewhere.


             reply	other threads:[~1999-11-08  3:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-08  3:09 Clint Adams [this message]
1999-11-08  8:24 Sven Wischnowsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19991107220950.A21153@dman.com \
    --to=schizo@debian.org \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).