Граф коммитов

8 Коммитов

Автор SHA1 Сообщение Дата
Wu e288604eb3 [ruby/reline] Use IO's encoding instead of Encoding.default_external
(https://github.com/ruby/reline/pull/765)

* use IO's encoding

* refactoring

* remove unused encoding params

* (for retriggering CI) remove unused encoding params

https://github.com/ruby/reline/commit/f09772adab
2024-10-22 14:43:18 +00:00
tomoya ishida d7bc6f0eff [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 <stan001212@gmail.com>

* 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 <stan001212@gmail.com>
2024-03-19 14:17:26 +00:00
Stan Lo 24d9e21f84 [ruby/reline] Reduce direct references to `Reline::IOGate`
(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
2023-07-07 17:27:25 +00:00
aycabta 1192393b3e Stop using global constant, RELINE_TEST_ENCODING 2021-06-21 22:12:14 +09:00
aycabta af19f9a6e9 Call Reline.test_reset in teardown definitely 2021-06-21 22:12:14 +09:00
aycabta f8ea2860b0 Introduce an abstracted structure about the encoding of Reline
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.
2020-01-14 15:40:38 +09:00
aycabta 1bfba99b79 Close leaked file descripters in tests 2019-06-03 03:38:39 +09:00
Nobuyoshi Nakada 3457ce4486 Fix ArgumentError in aliased macro
Closes: https://github.com/ruby/ruby/pull/2221
2019-06-03 01:35:48 +09:00