Commit f48b82fd authored by Gergely Risko's avatar Gergely Risko Committed by Chong Yidong

Fix for undo recording in decode_coding.

* coding.c (decode_coding): Record buffer modification before
disabling undo_list.

Fixes: debbugs:11773
parent fd318b54
2012-08-14 Gergely Risko <gergely@risko.hu>
* coding.c (decode_coding): Record buffer modification before
disabling undo_list (Bug#11773).
2012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
Revert and cleanup some recent overlay changes.
......
......@@ -7102,6 +7102,15 @@ decode_coding (struct coding_system *coding)
set_buffer_internal (XBUFFER (coding->dst_object));
if (GPT != PT)
move_gap_both (PT, PT_BYTE);
/* We must disable undo_list in order to record the whole insert
transaction via record_insert at the end. But doing so also
disables the recording of the first change to the undo_list.
Therefore we check for first change here and record it via
record_first_change if needed. */
if (MODIFF <= SAVE_MODIFF)
record_first_change ();
undo_list = BVAR (current_buffer, undo_list);
BSET (current_buffer, undo_list, Qt);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment