summaryrefslogtreecommitdiff
path: root/src/cmds.c
diff options
context:
space:
mode:
authorPip Cet <pipcet@protonmail.com>2026-05-26 14:07:11 +0000
committerPip Cet <pipcet@protonmail.com>2026-05-26 14:10:16 +0000
commit25fb3f9b467c5dccddca4afead9b1ea6e29b08fb (patch)
tree9e637572762696ee236dd0e9bede46beb167e13c /src/cmds.c
parent72b50901ef95410810b4ca7ecf103f028b8ae4b4 (diff)
Fix self-insert-command in multibyte buffers (bug#81129)
* src/cmds.c (internal_self_insert): Pass PT_BYTE to FETCH_BYTE, not PT.
Diffstat (limited to 'src/cmds.c')
-rw-r--r--src/cmds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmds.c b/src/cmds.c
index 9ca9a6d28de..f226c7542b3 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -489,7 +489,7 @@ internal_self_insert (int c, EMACS_INT n)
SET_PT_BOTH (PT - 1, PT_BYTE - 1);
auto_fill_result = call0 (Qinternal_auto_fill);
/* Test PT < ZV in case the auto-fill-function is strange. */
- if (c == '\n' && PT < ZV && FETCH_BYTE (PT) == '\n')
+ if (c == '\n' && PT < ZV && FETCH_BYTE (PT_BYTE) == '\n')
SET_PT_BOTH (PT + 1, PT_BYTE + 1);
if (!NILP (auto_fill_result))
hairy = 2;