-
Notifications
You must be signed in to change notification settings - Fork 83
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
ed_quoted_insert doesn't work properly #321
Comments
Need to support:
Considering whether to support:
|
Thanks for the detailed research and report. I'm currently taking some steps to address the issue. Please wait a little longer. |
Thanks for the fix. I've tried #335, but there seem to be some problems. First, I think TSTP should not be trapped except after ed_quoted_insert. Then, the behavior of C-z after ed_quoted_insert seems to be wrong.
Type C-v, C-z.
Type Enter.
There seems to be two problems.
Then, type Enter again.
|
This PR was an effort to address ruby#321 (ed_quoted_insert doesn't work properly) but per the reporter it did not work correctly. Moreover, it introduced a major regression: Shell job control stopped working in all applications that use reline, notably IRB. Bash and other shells send SIGTSTP in response to C-z to implement job suspension. Handling SIGSTP opts out of this functionality. For a line oriented terminal program this should be avoided (not to mention, this behavior diverges from readline's)
This PR was an effort to address #321 (ed_quoted_insert doesn't work properly) but per the reporter it did not work correctly. Moreover, it introduced a major regression: Shell job control stopped working in all applications that use reline, notably IRB. Bash and other shells send SIGTSTP in response to C-z to implement job suspension. Handling SIGSTP opts out of this functionality. For a line oriented terminal program this should be avoided (not to mention, this behavior diverges from readline's) Co-authored-by: Carl Brasic <cbrasic@drwholdings.com>
Description
ed_quoted_insert doesn't seem to work properly with some of keys.
("properly" means "
different fromsame as readline 8.1")Steps to Reproduce
Environment:
Scenario:
Start
irb --readline
and type ", ", C-b.The cursor is at the second
"
.Type C-v, C-a, Enter.
Do the same key operation on
irb
without--readline
.Compare the input string
"^A"
and the output string"\u0001"
withirb --readline
.Result:
"^A"
=>"\u0001"
"^A"
=>"\u0001"
"^B"
=>"\u0002"
"^B"
=>"\u0002"
"^C"
=>"\u0003"
"^D"
=>"\u0004"
"^D"
=>"\u0004"
"^E"
=>"\u0005"
"^E"
=>"\u0005"
"^F"
=>"\u0006"
"^F"
=>"\u0006"
"^G"
=>"\a"
"^G"
=>"\a"
"^H"
=>"\b"
"^H"
=>"\b"
"^K"
=>"\v"
"^K"
=>"\v"
"^L"
=>"\f"
"^L"
=>"\f"
"^N"
=>"\u000E"
"^N"
=>"\u000E"
"^O"
=>"\u000F"
"^O"
=>"\u000F"
"^P"
=>"\u0010"
"^P"
=>"\u0010"
"^Q"
=>"\u0011"
"^Q"
=>"\u0011"
"^R"
=>"\u0012"
"^R"
=>"\u0012"
"^S"
=>"\u0013"
"^S"
=>"\u0013"
"^T"
=>"\u0014"
"^T"
=>"\u0014"
"^U"
=>"\u0015"
"^U"
=>"\u0015"
"^V"
=>"\u0016"
"^V"
=>"\u0016"
"^W"
=>"\u0017"
"^W"
=>"\u0017"
"^X"
=>"\u0018"
"^X"
=>"\u0018"
"^Y"
=>"\u0019"
"^Y"
=>"\u0019"
"^Z"
=>"\u001A"
"^["
=>"\e"
"^["
=>"\e"
"^\"
=>"\u001C"
"^]"
=>"\u001D"
"^]"
=>"\u001D"
"^^"
=>"\u001E"
"^^"
=>""
"^_"
=>"\u001F"
"^_"
=>"\u001F"
"^?"
=>"\u007F"
"^?"
=>"\u007F"
C-2
Readline:
Reline:
Readline doesn't seem to be able to handle NUL, but Reline does.
C-c
Reline:
C-c breaks the input.
C-i
Readline:
Reline:
Reline doesn't seem to be able to handle C-i.
C-j
Readline:
Reilne:
The display is different, but it seems to work correctly.
C-m
Readline:
Reline:
C-z
Reline:
irb goes to the background.
C-\, C-4
Reline:
Bug of MRI ?
Terminal Emulator
PuTTYrv 0.76-ranvis2 (CJK)
The text was updated successfully, but these errors were encountered: