projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a1dcf5
)
Avoid assertion violations in buf_bytepos_to_charpos
author
Eli Zaretskii
<eliz@gnu.org>
Mon, 4 Mar 2019 17:22:23 +0000
(19:22 +0200)
committer
Eli Zaretskii
<eliz@gnu.org>
Mon, 4 Mar 2019 17:22:23 +0000
(19:22 +0200)
* src/marker.c (buf_bytepos_to_charpos): Disable the assertion
regarding bytepos always at the head byte of a multibyte
sequence.
src/marker.c
patch
|
blob
|
history
diff --git
a/src/marker.c
b/src/marker.c
index 0b2e1bf5c6b8f78b5db09e84d7e0420f5d374067..6755993bfac51fc03e09609aad7b02176465bc6a 100644
(file)
--- a/
src/marker.c
+++ b/
src/marker.c
@@
-332,9
+332,11
@@
buf_bytepos_to_charpos (struct buffer *b, ptrdiff_t bytepos)
if (best_above == best_above_byte)
return bytepos;
+#if 0
/* Check bytepos is not in the middle of a character. */
eassert (bytepos >= BUF_Z_BYTE (b)
|| CHAR_HEAD_P (BUF_FETCH_BYTE (b, bytepos)));
+#endif
best_below = BEG;
best_below_byte = BEG_BYTE;