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

Reline does not support convert-meta #710

Closed
tompng opened this issue May 28, 2024 · 1 comment
Closed

Reline does not support convert-meta #710

tompng opened this issue May 28, 2024 · 1 comment

Comments

@tompng
Copy link
Member

tompng commented May 28, 2024

When encoding is set to 7bit-encoding or convert-meta is turned on in inputrc, Readline converts byte(>= 128) to ESC + (byte & 0x7f).
Looking into the source code, it looks like Reline is trying to support it, but actually it does not.

We can either support it (if an environment using 8th bit as meta still exist), or clean up unused code.

How to reproduce

Bytes of Japanese letter is [227, 129, 130] which will be converted to ESC c ESC \C-a ESC \C-b.
To reproduce, type directly from IME or paste without using bracketed paste.

# ~/.inputrc
set enable-bracketed-paste off

Readline

LANG="" irb --readline
irb(main):001> Readline::VERSION
=> "8.2" # Make sure readline-ext is installed
# input "foobar\C-aあ"
irb(main):002> Foobar

Reline

LANG="" irb
irb(main):001> Encoding.default_external
=> #<Encoding:US-ASCII>
# input "foobar\C-aあ"
irb(main):002> foobar
# does not respond to keystrokes(except arrow keys)
@tompng
Copy link
Member Author

tompng commented Jul 4, 2024

#715 will remove code from that looks like trying to support convert-meta.
#723 will let reline work well configuring meta key binding without implementing convert-meta.

@tompng tompng closed this as completed Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant