From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: [jimb@red-bean.com: Redisplay bug in 21.2.90.1] Date: 15 Jun 2002 00:54:45 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: <5xofedxyh6.fsf@kfs2.cua.dk> References: <20020611073034.889577C016@mail.filanet.dk> <5x3cvqixez.fsf@kfs2.cua.dk> <200206141547.g5EFlc208922@aztec.santafe.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1024091872 21130 127.0.0.1 (14 Jun 2002 21:57:52 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 14 Jun 2002 21:57:52 +0000 (UTC) Cc: emacs-devel@gnu.org, jimb@red-bean.com Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17Iz4q-0005Uh-00 for ; Fri, 14 Jun 2002 23:57:52 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17IzTn-0007SU-00 for ; Sat, 15 Jun 2002 00:23:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17Iz4B-0003ad-00; Fri, 14 Jun 2002 17:57:11 -0400 Original-Received: from mail.filanet.dk ([195.215.206.179]) by fencepost.gnu.org with smtp (Exim 3.34 #1 (Debian)) id 17Iz1A-0003K2-00; Fri, 14 Jun 2002 17:54:05 -0400 Original-Received: from kfs2.cua.dk.cua.dk (unknown [10.1.82.3]) by mail.filanet.dk (Postfix) with SMTP id 70DFB7C016; Fri, 14 Jun 2002 21:54:02 +0000 (GMT) Original-To: rms@gnu.org In-Reply-To: <200206141547.g5EFlc208922@aztec.santafe.edu> Original-Lines: 70 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:4877 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:4877 Richard Stallman writes: > I just committed a fix on HEAD. > > Thanks. > > I guess it isn't serious enough to include on RC branch...? > > Maybe it is--it depends how safe the fix is. I think the fix is quite safe. I actually added the fix in three different functions which inserts text in a buffer. Only one of these funtions was responsible for the behaviour reported by Jim. > Could you show us the fix? > Index: insdel.c =================================================================== RCS file: /cvs/emacs/src/insdel.c,v retrieving revision 1.166 retrieving revision 1.167 diff -c -r1.166 -r1.167 *** insdel.c 9 Feb 2002 22:57:25 -0000 1.166 --- insdel.c 13 Jun 2002 22:07:13 -0000 1.167 *************** *** 1031,1036 **** --- 1031,1040 ---- if (GPT_BYTE < GPT) abort (); + /* The insert may have been in the unchanged region, so check again. */ + if (Z - GPT < END_UNCHANGED) + END_UNCHANGED = Z - GPT; + adjust_overlays_for_insert (PT, nchars); adjust_markers_for_insert (PT, PT_BYTE, PT + nchars, PT_BYTE + nbytes, *************** *** 1154,1159 **** --- 1158,1167 ---- if (GPT_BYTE < GPT) abort (); + /* The insert may have been in the unchanged region, so check again. */ + if (Z - GPT < END_UNCHANGED) + END_UNCHANGED = Z - GPT; + adjust_overlays_for_insert (PT, nchars); adjust_markers_for_insert (PT, PT_BYTE, PT + nchars, PT_BYTE + outgoing_nbytes, *************** *** 1300,1305 **** --- 1308,1317 ---- if (GPT_BYTE < GPT) abort (); + + /* The insert may have been in the unchanged region, so check again. */ + if (Z - GPT < END_UNCHANGED) + END_UNCHANGED = Z - GPT; adjust_overlays_for_insert (PT, nchars); adjust_markers_for_insert (PT, PT_BYTE, PT + nchars, -- Kim F. Storm http://www.cua.dk