diff options
| author | Stefan Monnier | 2024-06-27 15:36:28 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2024-06-27 15:36:28 -0400 |
| commit | b595b4598e7b3dabe4d45895f5580c9a351f2885 (patch) | |
| tree | b7b8b19ee3acda6224b31c274ebd04776c32e655 /src | |
| parent | 253172162107b34ebd24b8fbe1db4ac10a3931bd (diff) | |
| download | emacs-b595b4598e7b3dabe4d45895f5580c9a351f2885.tar.gz emacs-b595b4598e7b3dabe4d45895f5580c9a351f2885.zip | |
(buf_bytepos_to_charpos): Fix mixup introduced in commit b300052fb4ef
* src/marker.c (buf_bytepos_to_charpos): Don't compare byte-positions
with char-positions.
Diffstat (limited to 'src')
| -rw-r--r-- | src/marker.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/marker.c b/src/marker.c index f016bf9c088..9aaa2e7402c 100644 --- a/src/marker.c +++ b/src/marker.c | |||
| @@ -358,11 +358,11 @@ buf_bytepos_to_charpos (struct buffer *b, ptrdiff_t bytepos) | |||
| 358 | { | 358 | { |
| 359 | CONSIDER (tail->bytepos, tail->charpos); | 359 | CONSIDER (tail->bytepos, tail->charpos); |
| 360 | 360 | ||
| 361 | /* If we are down to a range of 50 chars, | 361 | /* If we are down to a range of DISTANCE bytes, |
| 362 | don't bother checking any other markers; | 362 | don't bother checking any other markers; |
| 363 | scan the intervening chars directly now. */ | 363 | scan the intervening chars directly now. */ |
| 364 | if (best_above - bytepos < distance | 364 | if (best_above_byte - bytepos < distance |
| 365 | || bytepos - best_below < distance) | 365 | || bytepos - best_below_byte < distance) |
| 366 | break; | 366 | break; |
| 367 | else | 367 | else |
| 368 | distance += BYTECHAR_DISTANCE_INCREMENT; | 368 | distance += BYTECHAR_DISTANCE_INCREMENT; |