GNU bug report logs - #15973
24.3.50; Cursor switching brutally several lines at a time with next/previous-line

Previous Next

Package: emacs;

Reported by: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>

Date: Mon, 25 Nov 2013 14:26:05 UTC

Severity: important

Found in version 24.3.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: thierry.volpiatto <at> gmail.com
Cc: 15973 <at> debbugs.gnu.org
Subject: bug#15973: 24.3.50; Cursor switching brutally several lines at a time	with	next/previous-line
Date: Tue, 26 Nov 2013 21:08:09 +0200
Can you try the patch below?

(FWIW, I couldn't reproduce the problem using something similar to
your recipe, but with bzr instead of git.)

=== modified file 'src/fileio.c'
--- src/fileio.c	2013-11-23 11:32:05 +0000
+++ src/fileio.c	2013-11-26 19:04:33 +0000
@@ -3858,6 +3858,9 @@ by calling `format-decode', which see.  
 	  beg_offset += same_at_start - BEGV_BYTE;
 	  end_offset -= ZV_BYTE - same_at_end;
 
+	  invalidate_buffer_caches (current_buffer,
+				    BYTE_TO_CHAR (same_at_start),
+				    BYTE_TO_CHAR (same_at_end));
 	  del_range_byte (same_at_start, same_at_end, 0);
 	  /* Insert from the file at the proper position.  */
 	  temp = BYTE_TO_CHAR (same_at_start);
@@ -3968,7 +3971,12 @@ by calling `format-decode', which see.  
 	{
 	  /* Truncate the buffer to the size of the file.  */
 	  if (same_at_start != same_at_end)
-	    del_range_byte (same_at_start, same_at_end, 0);
+	    {
+	      invalidate_buffer_caches (current_buffer,
+					BYTE_TO_CHAR (same_at_start),
+					BYTE_TO_CHAR (same_at_end));
+	      del_range_byte (same_at_start, same_at_end, 0);
+	    }
 	  inserted = 0;
 
 	  unbind_to (this_count, Qnil);
@@ -4016,6 +4024,9 @@ by calling `format-decode', which see.  
 
       if (same_at_end != same_at_start)
 	{
+	  invalidate_buffer_caches (current_buffer,
+				    BYTE_TO_CHAR (same_at_start),
+				    BYTE_TO_CHAR (same_at_end));
 	  del_range_byte (same_at_start, same_at_end, 0);
 	  temp = GPT;
 	  eassert (same_at_start == GPT_BYTE);





This bug report was last modified 11 years and 179 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.