bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#23871: 25.1.50; Undo unexpectedly leads to blank buffer


From: Phillip Lord
Subject: bug#23871: 25.1.50; Undo unexpectedly leads to blank buffer
Date: Thu, 30 Jun 2016 22:45:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (gnu/linux)

Markus Triska <triska@metalevel.at> writes:
> Please see #21722. It shows that point position after undo is different
> from what it was before, just as in this case. I constructed the case
> shown in #21722 due to the issues with undo after process output, and I
> suspect these issues are related. Redisplay may also be involved.
>
>
>> Also, how important is it to have exactly the font you mention and
>> exactly that size?  (I tried that font and that size, as well as a few
>> others, but that didn't help in my case.)
>
> The font and even window size definitely have an impact on this
> issue. Please try a different window size, and I hope you can then
> reproduce the issue, or at least #21722.

I believe the following patch fixes #21722.


>From 6687d6162941b7d5a5d7e41c3a7e1b1a1527538f Mon Sep 17 00:00:00 2001
From: Phillip Lord <phillip.lord@russet.org.uk>
Date: Thu, 30 Jun 2016 22:06:00 +0100
Subject: [PATCH] Fix missing point information in undo

* src/undo.c (record_insert): Use record_point instead of
  prepare_record.

Addresses Bug# 21722
---
 src/undo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/undo.c b/src/undo.c
index be5b270..cafe351 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -83,7 +83,7 @@ record_insert (ptrdiff_t beg, ptrdiff_t length)
   if (EQ (BVAR (current_buffer, undo_list), Qt))
     return;
 
-  prepare_record ();
+  record_point (beg);
 
   /* If this is following another insertion and consecutive with it
      in the buffer, combine the two.  */
-- 
2.9.0


reply via email to

[Prev in Thread] Current Thread [Next in Thread]