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

Refactor waiting_proc and waiting_operator_proc #626

Closed
wants to merge 7 commits into from

Conversation

tompng
Copy link
Member

@tompng tompng commented Dec 31, 2023

Fixes #605

waiting_proc

Most waiting_proc will be cancelled when ARROW keys (and other symbol key) is pressed, but Reline did not implement cancel

# Method that uses waiting_proc and cancel when ARROW is pressed
incremental_search_history
vi_replace_char
vi_next_char
vi_to_next_char
vi_prev_char
vi_to_prev_char
# Exceptional case that readline inserts escape sequence when ARROW is pressed
ed_quoted_insert

Fixes except ed_quoted_insert.

waiting_operator_proc

Vi mode's waiting_operator_proc was complex.

c: vi_change_meta
d: vi_delete_meta
y: vi_yank

Reline's problem with waiting_operator

  • df_ does not terminate delete_meta
  • dd should clear line
  • cc should clear line
  • dc dy cd cy yd yc yy should cancel waiting_operator
  • For 3d5h, 5 should be used as @vi_arg but Reline does not
  • ARROW key should cancel waiting_operator

Fixes all of them.

@tompng tompng force-pushed the reline_0.5.0.pre branch 3 times, most recently from 83232d0 to 97d76d8 Compare March 19, 2024 13:12
@ima1zumi ima1zumi deleted the branch ruby:reline_0.5.0.pre March 19, 2024 14:17
@ima1zumi ima1zumi closed this Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants