Skip to content

Use cursor-x-coordinate instead of byte_pointer in em_exchange_mark#868

Merged
ima1zumi merged 1 commit intoruby:masterfrom
tompng:fix_em_exchange_mark_crash
Mar 10, 2026
Merged

Use cursor-x-coordinate instead of byte_pointer in em_exchange_mark#868
ima1zumi merged 1 commit intoruby:masterfrom
tompng:fix_em_exchange_mark_crash

Conversation

@tompng
Copy link
Copy Markdown
Member

@tompng tompng commented Nov 19, 2025

Fixes #794
Marked byte_position could be an invalid byte position when the marked line is edited.
Use cursor position and move to the nearest valid position instead.

Marked byte_position could be an invalid byte position when the marked line is edited.
Use cursor position and move to the nearest valid position instead.
Copy link
Copy Markdown
Member

@ima1zumi ima1zumi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ima1zumi ima1zumi merged commit 094dcd4 into ruby:master Mar 10, 2026
85 of 86 checks passed
@tompng tompng deleted the fix_em_exchange_mark_crash branch March 17, 2026 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

em_exchange_mark has a possibility to set invalid byte_pointer

2 participants