all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
To: Eli Zaretskii <eliz@gnu.org>
Cc: David Reitter <david.reitter@gmail.com>, emacs-devel@gnu.org
Subject: Re: Truncating scroll runs that copy to where we copied to
Date: Tue, 22 Nov 2011 15:22:48 +0900	[thread overview]
Message-ID: <wlk46svfpj.wl%mituharu@math.s.chiba-u.ac.jp> (raw)
In-Reply-To: <E1RSjTJ-0007yO-Hd@fencepost.gnu.org>

>>>>> On Tue, 22 Nov 2011 01:04:45 -0500, Eli Zaretskii <eliz@gnu.org> said:

> FWIW, this code was not touched since Emacs 21.1 was released.  So
> evidently the effects of this issue are quite subtle in practice.

That code had not taken effect for most cases (especially when there's
no partially visible row at the bottom) until I made the following
fix:

2011-05-21  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>

	* dispnew.c (scrolling_window): Don't exclude the case that the
	last enabled row in the desired matrix touches the bottom boundary.

=== modified file 'src/dispnew.c'
*** src/dispnew.c	2011-05-12 07:07:06 +0000
--- src/dispnew.c	2011-05-21 02:15:34 +0000
***************
*** 4330,4352 ****
  
    first_old = first_new = i;
  
!   /* Set last_new to the index + 1 of the last enabled row in the
!      desired matrix.  */
    i = first_new + 1;
!   while (i < desired_matrix->nrows - 1
! 	 && MATRIX_ROW (desired_matrix, i)->enabled_p
! 	 && MATRIX_ROW_BOTTOM_Y (MATRIX_ROW (desired_matrix, i)) <= yb)
!     ++i;
  
!   if (!MATRIX_ROW (desired_matrix, i)->enabled_p)
!     return 0;
  
    last_new = i;
  
!   /* Set last_old to the index + 1 of the last enabled row in the
!      current matrix.  We don't look at the enabled flag here because
!      we plan to reuse part of the display even if other parts are
!      disabled.  */
    i = first_old + 1;
    while (i < current_matrix->nrows - 1)
      {
--- 4330,4358 ----
  
    first_old = first_new = i;
  
!   /* Set last_new to the index + 1 of the row that reaches the
!      bottom boundary in the desired matrix.  Give up if we find a
!      disabled row before we reach the bottom boundary.  */
    i = first_new + 1;
!   while (i < desired_matrix->nrows - 1)
!     {
!       int bottom;
  
!       if (!MATRIX_ROW (desired_matrix, i)->enabled_p)
! 	return 0;
!       bottom = MATRIX_ROW_BOTTOM_Y (MATRIX_ROW (desired_matrix, i));
!       if (bottom <= yb)
! 	++i;
!       if (bottom >= yb)
! 	break;
!     }
  
    last_new = i;
  
!   /* Set last_old to the index + 1 of the row that reaches the bottom
!      boundary in the current matrix.  We don't look at the enabled
!      flag here because we plan to reuse part of the display even if
!      other parts are disabled.  */
    i = first_old + 1;
    while (i < current_matrix->nrows - 1)
      {

That explains people (including I) did not notice the problem for a
long time.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp



  reply	other threads:[~2011-11-22  6:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-20  7:13 Truncating scroll runs that copy to where we copied to YAMAMOTO Mitsuharu
2011-11-20 18:23 ` Eli Zaretskii
2011-11-21  0:19   ` YAMAMOTO Mitsuharu
2011-11-21 23:50     ` David Reitter
2011-11-22  6:04       ` Eli Zaretskii
2011-11-22  6:22         ` YAMAMOTO Mitsuharu [this message]
2011-11-22  8:25           ` Eli Zaretskii
2011-11-22  8:47             ` YAMAMOTO Mitsuharu
2011-11-22  7:26         ` YAMAMOTO Mitsuharu
2011-11-22  8:52           ` Eli Zaretskii
2011-11-22  9:09             ` YAMAMOTO Mitsuharu
2011-11-22  9:54               ` Eli Zaretskii
2011-11-23  0:41                 ` YAMAMOTO Mitsuharu
2011-11-26 12:44                   ` Eli Zaretskii
2011-11-28  1:10                     ` YAMAMOTO Mitsuharu
2011-11-22  0:33 ` YAMAMOTO Mitsuharu

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=wlk46svfpj.wl%mituharu@math.s.chiba-u.ac.jp \
    --to=mituharu@math.s.chiba-u.ac.jp \
    --cc=david.reitter@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.