-
Notifications
You must be signed in to change notification settings - Fork 88
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
"①", "だ", "占" are not entered on 0.2.8.pre.8 #357
Comments
on UTF-8:
Perhaps last byte 0xA0 is considered So it is fixed by commenting out this line. |
It worked fine after disabling diff --git a/lib/reline/key_stroke.rb b/lib/reline/key_stroke.rb
index 16e5f69..396fa61 100644
--- a/lib/reline/key_stroke.rb
+++ b/lib/reline/key_stroke.rb
@@ -4,6 +4,7 @@ class Reline::KeyStroke
end
def compress_meta_key(ary)
+ return ary
ary.inject([]) { |result, key|
if result.size > 0 and result.last == "\e".ord
result[result.size - 1] = Reline::Key.new(key, key | 0b10000000, true) M-SPC is actually entered as 0x1B 0x20, so there is no need to treat 0xA0 specially. |
The behavior of this In readline(3):
|
If you want to make it compatible with readline: diff --git a/lib/reline/key_stroke.rb b/lib/reline/key_stroke.rb
index 16e5f69..c1c6151 100644
--- a/lib/reline/key_stroke.rb
+++ b/lib/reline/key_stroke.rb
@@ -4,6 +4,7 @@ class Reline::KeyStroke
end
def compress_meta_key(ary)
+ return ary unless @config.convert_meta
ary.inject([]) { |result, key|
if result.size > 0 and result.last == "\e".ord
result[result.size - 1] = Reline::Key.new(key, key | 0b10000000, true)
|
Co-authored-by: tmtm <tommy@tmtm.org> fix ruby#357 When using 8-bit characters, it is better not to use `compress_meta_key`. I believe not to use `compress_meta_key` unless `set convert-meta on` is written in the `.inputrc`. The following is a quote from tmtm's comments. > The behavior of this compress_meta_key method is similar to the behavior of convert-meta=on in readline, but readline turns off convert-meta if the locale contains 8bit characters. > In readline(3): > convert-meta (On) > If set to On, readline will convert characters with the eighth > bit set to an ASCII key sequence by stripping the eighth bit and > prefixing it with an escape character (in effect, using escape > as the meta prefix). The default is On, but readline will set > it to Off if the locale contains eight-bit characters.
Co-authored-by: TOMITA Masahiro <tommy@tmtm.org> fix ruby#357 When using 8-bit characters, it is better not to use `compress_meta_key`. I believe not to use `compress_meta_key` unless `set convert-meta on` is written in the `.inputrc`. The following is a quote from tmtm's comments. > The behavior of this compress_meta_key method is similar to the behavior of convert-meta=on in readline, but readline turns off convert-meta if the locale contains 8bit characters. > In readline(3): > convert-meta (On) > If set to On, readline will convert characters with the eighth > bit set to an ASCII key sequence by stripping the eighth bit and > prefixing it with an escape character (in effect, using escape > as the meta prefix). The default is On, but readline will set > it to Off if the locale contains eight-bit characters.
Co-authored-by: TOMITA Masahiro <tommy@tmtm.org> fix ruby#357 When using 8-bit characters, it is better not to use `compress_meta_key`. I believe not to use `compress_meta_key` unless `set convert-meta on` is written in the `.inputrc`. The following is a quote from tmtm's comments. > The behavior of this compress_meta_key method is similar to the behavior of convert-meta=on in readline, but readline turns off convert-meta if the locale contains 8bit characters. > In readline(3): > convert-meta (On) > If set to On, readline will convert characters with the eighth > bit set to an ASCII key sequence by stripping the eighth bit and > prefixing it with an escape character (in effect, using escape > as the meta prefix). The default is On, but readline will set > it to Off if the locale contains eight-bit characters.
fix `ruby#357` When using 8-bit characters, it is better not to use `compress_meta_key`. I believe not to use `compress_meta_key` unless `set convert-meta on` is written in the `.inputrc`. The following is a quote from tmtm's comments. > The behavior of this compress_meta_key method is similar to the behavior of convert-meta=on in readline, but readline turns off convert-meta if the locale contains 8bit characters. > In readline(3): > convert-meta (On) > If set to On, readline will convert characters with the eighth > bit set to an ASCII key sequence by stripping the eighth bit and > prefixing it with an escape character (in effect, using escape > as the meta prefix). The default is On, but readline will set > it to Off if the locale contains eight-bit characters. Co-authored-by: TOMITA Masahiro <tommy@tmtm.org>
Description
I cannot enter "①", "だ", "占" on reline 0.2.8.pre.8.
0.2.8.pre.7:
0.2.8.pre.8:
I typed "おだんご", but I can't type anything after "お"
Terminal Emulator
xterm, xfce4-terminal
The text was updated successfully, but these errors were encountered: