diff options
| author | Eli Zaretskii | 2019-03-05 18:25:23 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2019-03-05 18:25:23 +0200 |
| commit | 1c349c62305d432abf0fa2b6e3f5d754fe4cab79 (patch) | |
| tree | df72ec2f9359c00720e59065cbd408690d832008 /src | |
| parent | c5c2acd1c605243da7f8b9c4cd41ebdb0e9a7a38 (diff) | |
| download | emacs-1c349c62305d432abf0fa2b6e3f5d754fe4cab79.tar.gz emacs-1c349c62305d432abf0fa2b6e3f5d754fe4cab79.zip | |
Remove unreliable assertion in buf_bytepos_to_charpos
* src/marker.c (buf_bytepos_to_charpos): Remove the assertion
regarding bytepos always at the head byte of a multibyte
sequence. For the reasons, see
http://lists.gnu.org/archive/html/emacs-devel/2019-03/msg00100.html
http://lists.gnu.org/archive/html/emacs-devel/2019-03/msg00102.html
Diffstat (limited to 'src')
| -rw-r--r-- | src/marker.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/marker.c b/src/marker.c index 6755993bfac..b58051a8c2b 100644 --- a/src/marker.c +++ b/src/marker.c | |||
| @@ -332,12 +332,6 @@ buf_bytepos_to_charpos (struct buffer *b, ptrdiff_t bytepos) | |||
| 332 | if (best_above == best_above_byte) | 332 | if (best_above == best_above_byte) |
| 333 | return bytepos; | 333 | return bytepos; |
| 334 | 334 | ||
| 335 | #if 0 | ||
| 336 | /* Check bytepos is not in the middle of a character. */ | ||
| 337 | eassert (bytepos >= BUF_Z_BYTE (b) | ||
| 338 | || CHAR_HEAD_P (BUF_FETCH_BYTE (b, bytepos))); | ||
| 339 | #endif | ||
| 340 | |||
| 341 | best_below = BEG; | 335 | best_below = BEG; |
| 342 | best_below_byte = BEG_BYTE; | 336 | best_below_byte = BEG_BYTE; |
| 343 | 337 | ||