From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: Truncating scroll runs that copy to where we copied to Date: Tue, 22 Nov 2011 15:22:48 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <8339dibqlc.fsf@gnu.org> <6D358885-0CD8-4FC0-9598-549AB7E3D4AC@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: dough.gmane.org 1321942985 26772 80.91.229.12 (22 Nov 2011 06:23:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 22 Nov 2011 06:23:05 +0000 (UTC) Cc: David Reitter , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 22 07:23:01 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RSjkx-0003yo-6c for ged-emacs-devel@m.gmane.org; Tue, 22 Nov 2011 07:22:59 +0100 Original-Received: from localhost ([::1]:38474 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSjkv-0002dG-Uk for ged-emacs-devel@m.gmane.org; Tue, 22 Nov 2011 01:22:57 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:49798) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSjkt-0002d8-05 for emacs-devel@gnu.org; Tue, 22 Nov 2011 01:22:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RSjkr-0002gw-SA for emacs-devel@gnu.org; Tue, 22 Nov 2011 01:22:54 -0500 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:59404) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSjkp-0002gW-Iu; Tue, 22 Nov 2011 01:22:52 -0500 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 0DCC2C0561; Tue, 22 Nov 2011 15:22:49 +0900 (JST) In-Reply-To: User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-detected-operating-system: by eggs.gnu.org: NetBSD 3.0 (DF) X-Received-From: 133.82.132.2 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:146133 Archived-At: >>>>> On Tue, 22 Nov 2011 01:04:45 -0500, Eli Zaretskii 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 * 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