Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long lines containing multibyte characters sometimes disappear #581

Closed
elfham opened this issue Aug 20, 2023 · 1 comment
Closed

Long lines containing multibyte characters sometimes disappear #581

elfham opened this issue Aug 20, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@elfham
Copy link
Contributor

elfham commented Aug 20, 2023

Description

Long lines containing multibyte characters sometimes disappear.

Steps to Reproduce

Environment:

irb(main):001> irb_info;
Ruby version: 3.1.4
IRB version: irb 1.7.4 (2023-07-15)
InputMethod: RelineInputMethod with Reline 0.3.7
RUBY_PLATFORM: amd64-freebsd13
LANG env: ja_JP.UTF-8
East Asian Ambiguous Width: 2
irb(main):002>

Scenario:

Set screen width to 80.

irb(main):002> Reline::IOGate.get_screen_size
=> [66, 80]
irb(main):003>

Type or paste "あああああああああああああああああああああああああああああああああ.
Type C-a, then the cursor located at the beginning of the line.

irb(main):002> Reline::IOGate.get_screen_size
=> [66, 80]
irb(main):003" "ああああああああああああああああああああああああああああああああ
あ

At this point, the input line is displayed correctly.

Type (a SPC).

irb(main):002> Reline::IOGate.get_screen_size
=> [66, 80]

ああ

The input line disappeared.

Type (a SPC).

irb(main):002> Reline::IOGate.get_screen_size
=> [66, 80]
irb(main):003"   "あああああああああああああああああああああああああああああああ
ああ

The input line appeared again.

Type (a SPC).

irb(main):002> Reline::IOGate.get_screen_size
=> [66, 80]

ああ

The input line disappeared again.

The display toggles in the same way.

Terminal Emulator

PuTTYrv 0.78-ranvis2 (CJK)

@tompng
Copy link
Member

tompng commented Mar 26, 2024

Fixed by #614

@tompng tompng closed this as completed Mar 26, 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
Development

Successfully merging a pull request may close this issue.

3 participants