aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2023-08-30 17:16:59 +0300
committerEli Zaretskii2023-08-30 17:16:59 +0300
commit8650b3308dd83d6f87ed14562c7d55c8bfde3faf (patch)
tree1d65b0c8507a8fbf9efa6983dfbe159075f9516e /src
parent297ccd967f24e37bc51c057da43c862291a55ddd (diff)
downloademacs-8650b3308dd83d6f87ed14562c7d55c8bfde3faf.tar.gz
emacs-8650b3308dd83d6f87ed14562c7d55c8bfde3faf.zip
Fix revert-buffer when some decoding is involved
* src/fileio.c (Finsert_file_contents): Fix the amount of text read from the file when reverting. (Bug#65609)
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 23e1a83d8bf..8919e08e1fd 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -4805,7 +4805,7 @@ by calling `format-decode', which see. */)
4805 4805
4806 /* 'try' is reserved in some compilers (Microsoft C). */ 4806 /* 'try' is reserved in some compilers (Microsoft C). */
4807 ptrdiff_t trytry = min (gap_size, READ_BUF_SIZE); 4807 ptrdiff_t trytry = min (gap_size, READ_BUF_SIZE);
4808 if (!NILP (end)) 4808 if (seekable || !NILP (end))
4809 trytry = min (trytry, total - inserted); 4809 trytry = min (trytry, total - inserted);
4810 4810
4811 if (!seekable && NILP (end)) 4811 if (!seekable && NILP (end))