unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Subject: Another redisplay error in emacs HEAD.
Date: 07 Dec 2002 03:17:35 +0100	[thread overview]
Message-ID: <5xwummd134.fsf@kfs2.cua.dk> (raw)


The following happens with today's HEAD (but it also happens with a
version that I built from CVS on Oct 18), and it happens both under X
and with -nw in an xterm.  I'm running on GNU/Linux (tried on both red
hat 6.2 and 7.3).

Save the following text in a file (let's call it emacs-bug) and follow
these steps:

In an xterm window (at least 80 chars wide), do:

1) start emacs -q -no-site-file -nw

2) load the file emacs-bug into the sole window.

3) drag the bottom border of the xterm frame to resize the
   emacs window to make it exactly 17 lines high; the 
   'aaaa -- this should be on the last window line' should be
   at the bottom of the window.

4) place the cursor at the beginning of the second line
   (the first 'aaaa' line).

5) define a keyboard macro which moves down to the 'bbbb' line (C-n),
   deletes it (C-k C-k), and then moves down to the start of the next
   'aaaa' line (C-n C-n C-n), i.e.

        C-x ( C-n C-k C-k C-n C-n C-n C-x )

6) now execute the macro exactly 5 times

        C-x e e e e e

7) notice the odd position of the cursor; it is at the end
   of the [xx] line rather than at the start of the following
   'aaaa' line.   Moving the cursor right (C-f) moves it to
   the second 'a' on the next line, so emacs thinks that the cursor
   is in the "expected" position.

I suppose it has something to do with the cursor ending up on
the last window line [so the window should have scrolled, but
didn't].


Here is the file (don't include the 'cut here' lines!!!):

---------------------8<-------------- cut here ------------
[xx]  1) Adjust the window height to 17 lines [the bottom line is 'aaaa --']
aaaa  2) Move the cursor to the beginning of this line
bbbb  
cccc  3) Enter: C-x ( C-n C-k C-k C-n C-n C-n C-x )

[xx]
aaaa  4) The cursor should be at this line.
bbbb  5) Execute the keyboard macro 5 times C-x e e e e e
cccc

[xx]
aaaa
bbbb
cccc

[xx]
aaaa -- this should be on the last window line
bbbb
cccc

[xx]
aaaa
bbbb
cccc

[xx]
aaa +--------- cursor is now here
bbb |
ccc |
    v
[xx]
aaaa
bbbb
cccc

[xx]
aaaa
bbbb
cccc
---------------------8<-------------- cut here ------------


-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

                 reply	other threads:[~2002-12-07  2:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=5xwummd134.fsf@kfs2.cua.dk \
    --to=storm@cua.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.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).