Skip to content

Long lines containing multibyte characters sometimes disappear #581

@elfham

Description

@elfham

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions