[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r113872: * decompress.c (unwind_decompress): Always
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] trunk r113872: * decompress.c (unwind_decompress): Always restore point. |
Date: |
Wed, 14 Aug 2013 12:48:11 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 113872
revision-id: address@hidden
parent: address@hidden
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Wed 2013-08-14 14:47:05 +0200
message:
* decompress.c (unwind_decompress): Always restore point.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/decompress.c decompress.c-20130811194033-wfhl0tqmmc36jfmu-1
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-08-14 07:25:45 +0000
+++ b/src/ChangeLog 2013-08-14 12:47:05 +0000
@@ -1,3 +1,7 @@
+2013-08-14 Lars Magne Ingebrigtsen <address@hidden>
+
+ * decompress.c (unwind_decompress): Always restore point.
+
2013-08-14 Paul Eggert <address@hidden>
* xdisp.c (cursor_type_changed): Now static.
=== modified file 'src/decompress.c'
--- a/src/decompress.c 2013-08-13 21:17:09 +0000
+++ b/src/decompress.c 2013-08-14 12:47:05 +0000
@@ -95,12 +95,14 @@
struct decompress_unwind_data *data = ddata;
fn_inflateEnd (data->stream);
- /* Delete any uncompressed data already inserted and restore point. */
+ /* Delete any uncompressed data already inserted on error. */
if (data->start)
- {
- del_range (data->start, PT);
- SET_PT (data->old_point);
- }
+ del_range (data->start, PT);
+
+ /* Put point where it was, or if the buffer has shrunk because the
+ compressed data is bigger than the uncompressed, at
+ point-max. */
+ SET_PT (min (data->old_point, ZV));
}
DEFUN ("zlib-available-p", Fzlib_available_p, Szlib_available_p, 0, 0, 0,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r113872: * decompress.c (unwind_decompress): Always restore point.,
Lars Ingebrigtsen <=