diff options
author | tomoya ishida <[email protected]> | 2024-03-19 23:17:20 +0900 |
---|---|---|
committer | git <[email protected]> | 2024-03-19 14:17:26 +0000 |
commit | d7bc6f0effa1531a12b5c6b6286805854ed9d094 (patch) | |
tree | c1ce431d4aa69c03ab8855cf0b9b839287f462c4 /test/reline/test_string_processing.rb | |
parent | e127289632396f268099c9815a59bc7e7f13b3ec (diff) |
[ruby/reline] Reline 0.5.0.pre
(https://github.com/ruby/reline/pull/614)
* Re-architecture LineEditor's internal state and rendering
* Fix test related to LineEditor re-architecture
* Bump to 0.5.0.pre.1
* Hide cursor only when updating screen. Frequent hide&show makes cursor flickering.
* Simplify rerender call from reline.rb
* Simplify handle_cleared
It only need to clear screen. line_editor.rerender will be called later.
* Add description of updating pasting_state inserts continuous_insertion_buffer
* Use meaningful block parameter
Co-authored-by: Stan Lo <[email protected]>
* Fix use of `@cursor_y`
Fix bug updating `@cursor_y`. Do not use `@cursor_y` while updating dialog because it is not current cursor position but cursor position at last rendered time.
* Remove useless instance_variable_set in test
These instance variables are already removed from LineEditor
* Always initialize instance variables to avoid ruby 2.7 warning, remove unused instance variable
* Call update_dialogs from reline.rb before first render
* Combine state representing rendered screen information into `@rendered_screen`
* Rename editor_cursor_ to wrapped_cursor
It represents cursor position of word wrapped whole content
* Remove unused code, tweak, add comment
---------
https://github.com/ruby/reline/commit/3fa376217d
Co-authored-by: Stan Lo <[email protected]>
Diffstat (limited to 'test/reline/test_string_processing.rb')
-rw-r--r-- | test/reline/test_string_processing.rb | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/test/reline/test_string_processing.rb b/test/reline/test_string_processing.rb index 2e5d27dc4f..c9b9e38643 100644 --- a/test/reline/test_string_processing.rb +++ b/test/reline/test_string_processing.rb @@ -30,10 +30,7 @@ class Reline::LineEditor::StringProcessingTest < Reline::TestCase @line_editor.instance_variable_set(:@is_multiline, true) @line_editor.instance_variable_set(:@buffer_of_lines, buf) - @line_editor.instance_variable_set(:@line, buf[1]) @line_editor.instance_variable_set(:@byte_pointer, 3) - @line_editor.instance_variable_set(:@cursor, 3) - @line_editor.instance_variable_set(:@cursor_max, 11) @line_editor.instance_variable_set(:@line_index, 1) @line_editor.instance_variable_set(:@completion_proc, proc { |target| assert_equal('p', target) @@ -42,10 +39,7 @@ class Reline::LineEditor::StringProcessingTest < Reline::TestCase @line_editor.instance_variable_set(:@is_multiline, true) @line_editor.instance_variable_set(:@buffer_of_lines, buf) - @line_editor.instance_variable_set(:@line, buf[1]) @line_editor.instance_variable_set(:@byte_pointer, 6) - @line_editor.instance_variable_set(:@cursor, 6) - @line_editor.instance_variable_set(:@cursor_max, 11) @line_editor.instance_variable_set(:@line_index, 1) @line_editor.instance_variable_set(:@completion_proc, proc { |target, pre, post| assert_equal('puts', target) @@ -54,10 +48,7 @@ class Reline::LineEditor::StringProcessingTest < Reline::TestCase }) @line_editor.__send__(:call_completion_proc) - @line_editor.instance_variable_set(:@line, buf[0]) @line_editor.instance_variable_set(:@byte_pointer, 6) - @line_editor.instance_variable_set(:@cursor, 6) - @line_editor.instance_variable_set(:@cursor_max, 8) @line_editor.instance_variable_set(:@line_index, 0) @line_editor.instance_variable_set(:@completion_proc, proc { |target, pre, post| assert_equal('ho', target) @@ -66,10 +57,7 @@ class Reline::LineEditor::StringProcessingTest < Reline::TestCase }) @line_editor.__send__(:call_completion_proc) - @line_editor.instance_variable_set(:@line, buf[2]) @line_editor.instance_variable_set(:@byte_pointer, 1) - @line_editor.instance_variable_set(:@cursor, 1) - @line_editor.instance_variable_set(:@cursor_max, 3) @line_editor.instance_variable_set(:@line_index, 2) @line_editor.instance_variable_set(:@completion_proc, proc { |target, pre, post| assert_equal('e', target) |