Skip to content

Fix line wrapped cursor position - #791

Merged
tompng merged 1 commit into
ruby:masterfrom
tompng:line_wrap_calculation_fix
Dec 10, 2024
Merged

tompng merged 1 commit into
ruby:masterfrom
tompng:line_wrap_calculation_fix

Conversation

@tompng

@tompng tompng commented Dec 9, 2024 •

Copy link
Copy Markdown
Member

Cursor position calculation was wrong when the input line contains "\1" or CSI escape sequence.

Input: "\C-v\C-a\C-v\C-a\C-v\C-a\C-v\C-a\C-v\C-a\C-v\C-a\C-v\C-a"
Expected cursor position: just after closing quote

Reline version: "0.5.0".."0.5.10"
cursorpos_0_5_0
Reline version: "0.5.11".."0.5.12"
cursorpos_0_5_12
This pull request
cursorpos_pullreq

Cursor position calculation was wrong when the input line contains "\1" or CSI escape sequence.
@tompng
tompng merged commit a1943da into ruby:master Dec 10, 2024
matzbot pushed a commit to ruby/ruby that referenced this pull request Dec 10, 2024
(ruby/reline#791)

Cursor position calculation was wrong when the input line contains "\1" or CSI escape sequence.

ruby/reline@a1943daaf4
@tompng
tompng deleted the line_wrap_calculation_fix branch December 10, 2024 10:29
@ima1zumi ima1zumi added the bug Something isn't working label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants