summaryrefslogtreecommitdiff
path: root/test/reline/test_key_actor_vi.rb
AgeCommit message (Collapse)Author
12 days[ruby/reline] Improve key binding match/matching checktomoya ishida
(https://github.com/ruby/reline/pull/709) * Improve key binding match/matching check * Rename key_actors to default_key_bindings * Make key_stroke.expand always return a value * Update add_default_key_binding to use a add_default_key_binding_by_keymap internally Co-authored-by: Stan Lo <stan001212@gmail.com> --------- https://github.com/ruby/reline/commit/353ec236e2 Co-authored-by: Stan Lo <stan001212@gmail.com>
2024-04-16[ruby/reline] Implement changing editing modeMari Imaizumi
(https://github.com/ruby/reline/pull/681) https://github.com/ruby/reline/commit/501b9a6c5f
2024-04-15[ruby/reline] Fix vi_to_column which was brokentomoya ishida
(https://github.com/ruby/reline/pull/679) https://github.com/ruby/reline/commit/9e93ad52e7
2024-04-14[ruby/reline] Refactor waiting_proc and waiting_operator_proctomoya ishida
(https://github.com/ruby/reline/pull/649) * Fix waiting_proc precedence * Fix waiting_operator bugs * Add waiting_proc and vi_waiting_operator test * Fix vi waiting operator arg number vi_arg and vi_waiting_operator_arg should be multiplied * Implement `yy` copies whole line in vi_command mode * Simplify incremental search cancel test * Add complex vi test with waiting_proc and vi_waiting_operator, split test input https://github.com/ruby/reline/commit/777dffae1c
2024-04-14[ruby/reline] Support `menu-complete-backward` command for upwardMichael J. Giarlo
navigation (https://github.com/ruby/reline/pull/677) Fixes https://github.com/ruby/reline/pull/675 This commit extracts the upward navigation condition in `LineEditor#input_key` to a new private method, and adds a new alias. This change allows Reline to support upward navigation in when a user has configured `inputrc` to map Shift-Tab to `menu-complete-backward`, a common setting in Bash (>= 4.x). Instead of special-casing upward navigation in `LineEditor#input_key`, we now allow it to be processed by the branch that calls `process_key`. The extracted method no longer includes the editing mode check since this check is already made by `#wrap_method_call` by the time `#completion_journey_up` (or `#menu_complete_backward`) is called. Since upward navigation is happening in a method other than `#input_key` now, the `completion_occurs` variable that used to be local to `#input_key` is changed to an instance variable so that the new method can change its value. (I see many examples of mutating such instance variables in `LineEditor`, so I assumed this would be an uncontroversial change consistent with the coding practices already in place.) Test coverage of this change has been added to the emacs and vi `KeyActor` tests. Many thanks to @ima1zumi for their very helpful comments on #675 which encouraged me to contribute this work! https://github.com/ruby/reline/commit/2ccdb374a4
2024-03-25[ruby/reline] Remove useless testsStan Lo
(https://github.com/ruby/reline/pull/665) The pasting tests hadn't been working since as early as v0.2.0. Since what it tried to cover is already gone for such a long time, I think it's better to write new ones if needed then to keep them around. And since these tests are gone, the helper methods for just them are also gone. https://github.com/ruby/reline/commit/0eedf0e4a0
2024-03-24[ruby/reline] Refactor key actor testtomoya ishida
(https://github.com/ruby/reline/pull/645) * Add assertion assert_cursor_line to test helper * Autofix key_actor test to use assert_cursor_line * Rename the assertion to assert_line_around_cursor and remove other assertions for line and cursor https://github.com/ruby/reline/commit/e4773800c6
2024-02-13[ruby/reline] C for vi modeOtávio Schwanck dos Santos
(https://github.com/ruby/reline/pull/472) https://github.com/ruby/reline/commit/d197be7c44
2023-07-07[ruby/reline] Reduce direct references to `Reline::IOGate`Stan Lo
(https://github.com/ruby/reline/pull/566) * Avoid referencing IOGate from IOGate classes The only time those classes being used is when themselves being the IOGate. So when referencing to IOGate, it's better to use `self` instead. * Avoid referencing to IOGate from LineEditor directly * Avoid referencing to IOGate from Core directly * Reference to Reline.core directly * Replace Reline::IOGate with Reline.core.io_gate
2022-09-22[ruby/reline] use assert_nothing_raisedOtávio Schwanck dos Santos
https://github.com/ruby/reline/commit/f08be5da09
2022-09-22[ruby/reline] PR changesOtávio Schwanck dos Santos
https://github.com/ruby/reline/commit/e8e8d81f47
2021-12-24[ruby/reline] Rename the wrong name "em-kill-line" with the correct name ↵aycabta
"unix-line-discard" https://github.com/ruby/reline/commit/da7af35d1f
2021-08-29[ruby/reline] Fix tests so that the completion journey starts on first C-n/C-paycabta
https://github.com/ruby/reline/commit/52a40f2cd3
2021-06-21Stop using global constant, RELINE_TEST_ENCODINGaycabta
2021-06-21Call Reline.test_reset in teardown definitelyaycabta
2021-01-13[ruby/reline] Move the cursor correctly when deleting at eolaycabta
This fixes ruby/reline#246. https://github.com/ruby/reline/commit/07a73ba601
2020-12-24[ruby/reline] Doesn't contain terminate spaces by cwaycabta
This closes ruby/reline#233. https://github.com/ruby/reline/commit/4c3f2e2eae
2020-12-24[ruby/reline] Use #bytesize for vi_replace_charaycabta
This closes ruby/reline#228. https://github.com/ruby/reline/commit/8205fa0b00
2020-12-24[ruby/reline] Delete the last char of a line by dwaycabta
This closes ruby/reline#229. https://github.com/ruby/reline/commit/3f0ae689c4
2020-12-05[ruby/reline] Key strokes like 2dl should behave d2laycabta
Key strokes, vi arg, operator, and motion should be treated as operator, vi arg, and motion. https://github.com/ruby/reline/commit/d1a7e74aa4
2020-12-05[ruby/reline] Call process_insert when the end of pasting plural fullwidth charsaycabta
https://github.com/ruby/reline/commit/594484d9f9
2020-12-05[ruby/reline] Motions e, E, t, f should include a char on cursor if follows ↵aycabta
operator https://github.com/ruby/reline/commit/86e9a76499
2020-12-05[ruby/reline] Implement vi_yankaycabta
https://github.com/ruby/reline/commit/164aaf9a5f
2020-12-05[ruby/reline] Operator with arg need to make sure that they take arg to ↵aycabta
avoid crashing https://github.com/ruby/reline/commit/1c0c06de1f
2020-12-05[ruby/reline] Unimplemented vi command should be no-opaycabta
https://github.com/ruby/reline/commit/abc90e6867
2020-12-05[ruby/reline] Keep operator proc as a local variable in the scopeaycabta
The proc variable will be used later so the instance variable will be changes. https://github.com/ruby/reline/commit/496c4361f6
2020-01-21[ruby/reline] Implement vi_change_metaaycabta
https://github.com/ruby/reline/commit/8538e0e10f
2020-01-20[ruby/reline] Implement vi_prev_char and vi_to_prev_charaycabta
https://github.com/ruby/reline/commit/0ad3ee63fa
2020-01-20[ruby/reline] Implement vi_to_next_charaycabta
https://github.com/ruby/reline/commit/066ecb0a21
2020-01-17Implement vi_insert_at_bol and vi_add_at_eolaycabta
2020-01-17Add tests for vi_insert and vi_addaycabta
2020-01-14Introduce an abstracted structure about the encoding of Relineaycabta
The command prompt on Windows always uses Unicode to take input and print output but most Reline implementation depends on Encoding.default_external. This commit introduces an abstracted structure about the encoding of Reline.
2019-12-25^D on non-empty line in vi mode behaves like Enteraycabta
2019-12-05Change encoding of completion list...for more testsaycabta
2019-12-05Change encoding of completion listaycabta
2019-12-05Support disable-completionaycabta
2019-06-03The ed_move_to_beg is different from vi_first_printaycabta
2019-05-29Revert 3b7862c8e88cd7838a53ec083ac5733386400956 causing various CI hangsTakashi Kokubun
and dependent commits c67934b1c3b40dda5f170b032423e520511c68dd and f0d1dc5cee87dfb023cb43a2db9bcdef5a8dee8f. RubyCI and ci.rvm.jp are almost dead by timeout since this commit. --- Revert "Skip a reline test hanging on Wercker since 3b7862c8e8" This reverts commit f0d1dc5cee87dfb023cb43a2db9bcdef5a8dee8f. Revert "Remove extra items because Reline::HISTORY is a sized queue" This reverts commit c67934b1c3b40dda5f170b032423e520511c68dd. Revert "Use existing instances for LineEditor and Config" This reverts commit 3b7862c8e88cd7838a53ec083ac5733386400956.
2019-05-29Use existing instances for LineEditor and Configaycabta
2019-05-28Use Reline.completer_quote_characters to completeaycabta
2019-05-22Use Reline.test_mode in Reline's test tooaycabta
2019-05-14Rename Reline's test file name because of typoaycabta