]> git.eshelyaron.com Git - emacs.git/commit
(buf_*pos_to_*pos): Fix minor off-by one
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 2 Jul 2024 20:28:08 +0000 (16:28 -0400)
committerEshel Yaron <me@eshelyaron.com>
Wed, 3 Jul 2024 18:46:22 +0000 (20:46 +0200)
commit301a6f00db02d39a543660a18dec001cef03e3ee
treeab517bd01f6f2de1d5d6c873504ab237d68609c1
parent6514b6f0a08716d6171e8a91d330b03549ab5194
(buf_*pos_to_*pos): Fix minor off-by one

* src/marker.c (buf_charpos_to_bytepos, buf_bytepos_to_charpos):
Slightly restructure the markers loop so we check `distance`
also before "consider"ing the first marker.

(cherry picked from commit 0385c0c0820361b71a74988f23d0445238f30473)
src/marker.c