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

143 Коммитов

Автор SHA1 Сообщение Дата
Stan Lo 16b2e03014 [ruby/reline] Remove unapproved color setting APIs
These APIs/configs are not approved by the Ruby core, so they can't be
released to the public. This means having them in the codebase will
block other fixes/features from being released as well.

So this commit removes those exposed interfaces to unblock the release.

Hopefully when https://bugs.ruby-lang.org/issues/18996 is approved we
can re-implement better APIs.

https://github.com/ruby/reline/commit/f7a961c550
2022-12-05 03:14:55 +00:00
Nobuyoshi Nakada 59e8569cf9 [ruby/reline] Support dumb terminal
The "dumb" terminal is considered only on MSys tty now.  However, the
`TERM` feature has been used on many Unix-like systems for decades,
not MSys specific.

https://github.com/ruby/reline/commit/53fd51ab62
2022-09-01 16:36:16 +09:00
st0012 b3be030740 [ruby/reline] Rename dialog_pointer_* to dialog_highlight_*
"Pointer" is not what we usually use to describe a selected item.

"Highlight" is a more common word for the scenario so we should use it instead.

https://github.com/ruby/reline/commit/b4279d1557
2022-07-22 23:34:49 +09:00
st0012 36ca0e58b6 [ruby/reline] Use color name instead of code (integer) in dialog color APIs
As pointed out in the
[comment](https://github.com/ruby/reline/pull/413#issuecomment-1168033973),
the code is actually a control sequence and not only for colors.

To make the dialog color APIs safer to use, we should restrict its
usages and extract away the bg/fg concept from the input.

So in this commit, I made these changes:

1. The dialog_*_bg/fg_color APIs only takes and returns color names (symbol):
  - :black
  - :red
  - :green
  - :yellow
  - :blue
  - :magenta
  - :cyan
  - :white
2. Add additional dialog_*_bg/fg_color_sequence APIs to access the raw code.

https://github.com/ruby/reline/commit/b32a977766
2022-07-16 02:30:23 +09:00
pocari 8c6c3e30f3 [ruby/reline] Enable to change the background color of dialogs. (https://github.com/ruby/reline/pull/413)
https://github.com/ruby/reline/commit/bd49537964
2022-06-27 22:28:49 +09:00
Nobuyoshi Nakada d9ccb6b372 [ruby/reline] Check the ambiguous char width only on tty
It sent the char to check even to non-tty, e.g., pipe.
This causes `unknown command: "\xE2\x96\xBDstart ` warnings on
ruby's parallel test on Windows, where non-standard FDs cannot be
passed to child processes.

https://github.com/ruby/reline/commit/0d373647fb
2022-06-13 12:17:04 +09:00
aycabta 37aea9d798 [ruby/reline] Finalize when exception occurred
https://github.com/ruby/reline/commit/1f8a3aee43

Co-authored-by: Alex Gittemeier <me@a.lexg.dev>
2021-12-21 00:49:03 +09:00
aycabta c3a3f65b45 [ruby/reline] Split off set_signal_handler method
In some tests, the LineEditor#reset method is always called, but doesn't
need to set the signal handlers there, so cuts it out to a separate
method.

https://github.com/ruby/reline/commit/b143c4f5f9
2021-12-21 00:13:19 +09:00
aycabta 145c1e0691 [ruby/reline] Add support for overwriting dialog proc with the same name
https://github.com/ruby/reline/commit/16aa20c380
2021-12-20 14:54:42 +09:00
aycabta c462e07a5c [ruby/reline] Add Reline.dialog_proc(name_sym)
https://github.com/ruby/reline/commit/7e5dbe4750
2021-12-20 14:54:42 +09:00
aycabta 6f41cab704 [ruby/reline] Suppress warning, "instance variable @ambiguous_width not initialized"
https://github.com/ruby/reline/commit/368f7e2f78
2021-10-11 16:24:45 +09:00
manga_osyo b8327fb8b1 [ruby/reline] Refactoring Reline::Key.match? and add test.
https://github.com/ruby/reline/commit/90e8999ae4
2021-10-02 19:58:41 +09:00
aycabta 5dc753df47 [ruby/reline] Move #pointer from DialogRenderInfo to Dialog
https://github.com/ruby/reline/commit/92dbac0bff
2021-09-10 11:38:54 +09:00
aycabta 30203a6fd9 [ruby/reline] Use Symbol for method names
https://github.com/ruby/reline/commit/479eee5393
2021-09-07 02:42:49 +09:00
aycabta 966ed206a6 [ruby/reline] Limit number of chars only when completion source text (pointer == -1)
https://github.com/ruby/reline/commit/1d7b603811
2021-09-06 22:50:11 +09:00
aycabta 348bb62331 [ruby/reline] Cut out read_2nd_character_of_key_sequence
https://github.com/ruby/reline/commit/92518d1dee
2021-09-06 05:24:15 +09:00
aycabta 7de2c9a966 [ruby/reline] Use combined_key if it exists when comparing Reline::Key and Integer
https://github.com/ruby/reline/commit/8fca5f6f9c
2021-09-06 05:23:36 +09:00
aycabta 3773296bfc [ruby/reline] Allow Reline::KeyStroke to compare raw and meta-key processed key sequences
https://github.com/ruby/reline/commit/731103f9c9
2021-09-06 05:23:27 +09:00
aycabta 56ab22ab3d [ruby/reline] Support for key bindings result Symbol in Reline::Key
https://github.com/ruby/reline/commit/cf78a38064
2021-09-06 05:23:18 +09:00
aycabta bbb3162dd2 [ruby/reline] Add Reline::Key#== as an alias to Reline::Key#match?
https://github.com/ruby/reline/commit/1fc3276c01
2021-09-06 05:23:11 +09:00
aycabta bb6d45cfee [ruby/reline] Reline::Key supports the comparison with Integer
https://github.com/ruby/reline/commit/ebc3e0f673
2021-09-06 05:23:01 +09:00
aycabta ec36ceb072 [ruby/reline] Implement scrollbar
https://github.com/ruby/reline/commit/4c7fc42151
2021-09-04 21:40:12 +09:00
aycabta f445d34c25 [ruby/reline] Show even if it's only one candidate until a perfect match
https://github.com/ruby/reline/commit/fe7e34e79f
2021-09-04 02:16:28 +09:00
aycabta 9e0caba187 [ruby/reline] Add Reline::Key#match?
https://github.com/ruby/reline/commit/8f6aa3af2e
2021-09-03 04:27:48 +09:00
aycabta 8c067f182e [ruby/reline] Autocompletion ignites when target char length is 3 or longer
https://github.com/ruby/reline/commit/261830fda3
2021-09-03 01:12:46 +09:00
aycabta f734590f8e [ruby/reline] Add a space
https://github.com/ruby/reline/commit/3d70e07331
2021-09-02 21:36:24 +09:00
aycabta c8a07a1231 [ruby/reline] Fix Reline::Unicode.take_range as it was not fully functional
https://github.com/ruby/reline/commit/5da6a8d851
2021-08-31 15:19:32 +09:00
aycabta c98b2e14c7 [ruby/reline] Pass "dialog" to context to get "dialog.scroll_top" later
https://github.com/ruby/reline/commit/d81f29a134
2021-08-31 05:26:53 +09:00
aycabta 32abd38014 [ruby/reline] Autocompletion dialog height 15
https://github.com/ruby/reline/commit/7e18716754
2021-08-31 05:26:45 +09:00
aycabta 81d40b5b7e [ruby/reline] Scroll autocompletion pointer in dialog correctly
https://github.com/ruby/reline/commit/dc79ed2dd8
2021-08-31 05:26:39 +09:00
aycabta 282f7ce896 [ruby/reline] Use DialogRenderInfo struct
https://github.com/ruby/reline/commit/ac6f652a39
2021-08-31 05:26:33 +09:00
aycabta 8750e1ada8 [ruby/reline] Fix Reline.autocompletion=() interface
https://github.com/ruby/reline/commit/71c2eb143d
2021-08-30 02:37:23 +09:00
aycabta 3a2e2a6848 [ruby/reline] Add Reline.autocompletion=() interface
https://github.com/ruby/reline/commit/a2e69f6277
2021-08-30 02:37:23 +09:00
aycabta 935bb4c617 [ruby/reline] Add autocompletion on emacs mode by Tab / S-Tab
https://github.com/ruby/reline/commit/22d0b4e5d8
2021-08-30 02:37:23 +09:00
aycabta 7857a1ab66 [ruby/reline] Make autocomplete dialog is registered first
https://github.com/ruby/reline/commit/d027dbe118
2021-08-29 20:30:33 +09:00
aycabta 535a1cc71c [ruby/reline] Delete show doc dialog to move it to IRB
https://github.com/ruby/reline/commit/640102fe27
2021-08-29 20:30:33 +09:00
aycabta 74ba532883 [ruby/reline] Remove an unnecessary variable
https://github.com/ruby/reline/commit/3b8cc5ce0a
2021-08-29 20:30:33 +09:00
aycabta 3248c42592 [ruby/reline] Remove dialog_proc_list accessor of Reline
https://github.com/ruby/reline/commit/ac8fa84f4d
2021-08-29 20:30:33 +09:00
aycabta 32124de17e [ruby/reline] Move constants of dialogs to under Reline
https://github.com/ruby/reline/commit/9100ea2934
2021-08-29 20:30:33 +09:00
aycabta 29586ec9f3 [ruby/reline] Use default dialog context to communicate others
https://github.com/ruby/reline/commit/5e67e6ffe0
2021-08-29 20:30:33 +09:00
aycabta 6273b9bb62 [ruby/reline] Use colored doc output with ANSI escape sequence
https://github.com/ruby/reline/commit/7d1c75b43f
2021-08-29 20:30:33 +09:00
aycabta acd15a39d2 [ruby/reline] Support custom bg color
https://github.com/ruby/reline/commit/cd0cbf53d5
2021-08-29 20:30:33 +09:00
aycabta 78f46e6576 [ruby/reline] Show method or class doc correctly
https://github.com/ruby/reline/commit/a505294f12
2021-08-29 20:30:33 +09:00
aycabta 7e8a627052 [ruby/reline] Implement doc display dialog in conjunction with autocomplete
https://github.com/ruby/reline/commit/e97bbc4ccf
2021-08-29 20:30:33 +09:00
aycabta 4cd344c958 [ruby/reline] Add the ability to handle context between dialogs
https://github.com/ruby/reline/commit/063d9c70d9
2021-08-29 20:30:33 +09:00
aycabta 8d4370b066 [ruby/reline] Support for multiple dialog rendering
https://github.com/ruby/reline/commit/f589fab718
2021-08-29 20:30:33 +09:00
aycabta acffb0b068 [ruby/reline] Cut out the autocomplete callback
https://github.com/ruby/reline/commit/46aa2694da
2021-08-29 20:30:33 +09:00
aycabta 4b2b10707a [ruby/reline] Implement dynamic selection of candidates
https://github.com/ruby/reline/commit/e46437df00
2021-08-29 20:30:33 +09:00
aycabta 8e463e3e73 [ruby/reline] Remove unnecessary condition
https://github.com/ruby/reline/commit/07e911ec8e
2021-08-29 20:30:33 +09:00
aycabta 18c0814fe0 [ruby/reline] Fix typo
https://github.com/ruby/reline/commit/6370353c71
2021-08-29 20:30:33 +09:00