Commit graph

650 commits

Author SHA1 Message Date
Phillip Hellewell
f67f0d7268 [ruby/reline] Add key bindings for PgUp and PgDn
(https://github.com/ruby/reline/pull/509)

* Add key bindings for PgUp, PgDn

* Match behavior of readline 8.2

In the latest readline (8.2), page-up and page-down are bound to
history-search-backward and history-search-forward by default.

We would like reline to have the same default behavior.
2023-03-21 14:48:32 +00:00
tomoya ishida
e8e7ff1333 [ruby/reline] Fix: line longer than terminal width breaks rendering
(https://github.com/ruby/reline/pull/516)

ae5f9b87ab
2023-03-18 14:37:10 +00:00
tomoya ishida
6f81e38d1d [ruby/reline] Fix completion with multiline
(https://github.com/ruby/reline/pull/513)

d76c482c5f
2023-03-04 05:56:00 +00:00
tomoya ishida
4f611df3f7 [ruby/reline] Fix wrong indent number in prompt. whole_lines has
duplicated line.
(https://github.com/ruby/reline/pull/460)

* whole_lines should consider prev_line_index, and must not duplicate last_line

* Add test for lines passed to dynamic prompt proc

* Refactor whole_lines parameters used in test helper

* Remove whole_line's arguments
2023-02-27 10:21:30 +00:00
tomoya ishida
92ed8e6f3f [ruby/reline] Fix the cause of test_yamatanooroti randomly failing
(https://github.com/ruby/reline/pull/474)

* Add repeated input-delete test that fails on HEAD

* Use raw mode while readmultiline
2023-02-27 08:44:02 +00:00
tompng
91f353b1c3 [ruby/reline] Fix line rendering when newline is added at the end of the buffer
7d61b3df9a
2023-02-06 14:23:59 +00:00
Étienne Barrié
70eedef32a [ruby/reline] Splat is always an Array
82095bd62b
2023-01-31 09:33:49 +09:00
Hiroshi SHIBATA
eb2670e32d [ruby/reline] Revert "correct Win32API capitalization for JRuby"
This reverts commit d6e7c9e1d9.

c47a5b684c
2023-01-26 04:27:52 +00:00
tompng
4241b3cf2d [ruby/reline] accept new_indent > cursor_max
61cc580da4
2023-01-20 13:40:15 +00:00
tompng
8e53f09baa [ruby/reline] Add constant MINIMUM_SCROLLBAR_HEIGHT for scrollbar rendering when dialog content is very long
d4c95f89ec
2023-01-18 14:49:29 +00:00
tompng
a712f2a2a0 [ruby/reline] Fix dialog scrollbar rendering position and disappearing bug
e21b69ade4
2023-01-18 14:49:28 +00:00
elfham
aa66595876 [ruby/reline] Update to Unicode 15.0.0
(https://github.com/ruby/reline/pull/437)

* Update to Unicode 14.0.0

* Update to Unicode 15.0.0
2023-01-12 09:40:34 +00:00
tomoya ishida
0abb4b6348 [ruby/reline] Pass unmodifined lines(that does not include escape
sequence) to check_multiline_prompt
(https://github.com/ruby/reline/pull/458)

* pass unmodified lines to check_multiline_prompt

* Add test to check that output modified by output_modifier_proc is not passed to prompt_proc
2023-01-12 00:14:53 +00:00
Phillip Hellewell
97f8f2c470 [ruby/reline] Add key binding for Delete
603eacee22
2023-01-10 12:18:14 +00:00
Joel Anderson
e25c173c97 [ruby/reline] correct Win32API capitalization for JRuby
JRuby 9.4.0.0 introduced a change in case sensitivity in require statements,
meaning that an inclusion of `win32api` loaded Win32API.rb. With this change,
the require statement needs to be updated to the correct capitalization of the
filename to avoid reline failures in newer versions of JRuby.

d6e7c9e1d9
2023-01-04 06:32:46 +00:00
Hiroshi SHIBATA
989d993f5b [ruby/reline] Bump version to 0.3.2
3fbb7ec2ae
2022-12-14 07:01:19 +00:00
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.

f7a961c550
2022-12-05 03:14:55 +00:00
HASUMI Hitoshi
11871e49c4 [ruby/reline] Fix misuse of kwarg in IO#raw
- Obviously, `tim` is a typo for `time`
- This didn't cause an exception because IO#raw is implemented in C and it doesn't check the keyword of the parameters
- Though this typo doesn't produce any problems for now, I think it should be fixed just in case for the future
- I've used this fixed version of Reline with IRB for several days and didn't find any new problems due to the fix
- But I myself am not sure how to make sure this fix is completely robust

e66a9696a1
2022-12-02 10:47:18 +00:00
Otávio Schwanck dos Santos
696e8914b7 [ruby/reline] PR changes
e8e8d81f47
2022-09-22 22:28:38 +09:00
Otávio Schwanck dos Santos
9d19d910c0 [ruby/reline] Revert "update version"
This reverts commit ce1ac86179.

86602cd244
2022-09-22 22:28:37 +09:00
Otávio Schwanck dos Santos
224a3ea718 [ruby/reline] update version
ce1ac86179
2022-09-22 22:28:37 +09:00
Otávio Schwanck dos Santos
9fb18e6314 [ruby/reline] fix vi-operator-arg
d42cdb8f91
2022-09-22 22:28:36 +09:00
Nobuyoshi Nakada
1b8a644b44 [ruby/reline] Fix a typo [ci skip]
33bf80e757
2022-09-03 03:27:58 +09:00
Hiroshi SHIBATA
0d2422cf63 [ruby/reline] Workaround for padding width with Aracritty on macOS
fb4136c8a7
2022-09-02 16:09:51 +09:00
Hiroshi SHIBATA
7ff50ee35c [ruby/reline] Added some of abstruct methods for cursor
f5fa30d595
2022-09-02 16:09:50 +09:00
Mau Magnaguagno
941e9be0d9 [ruby/reline] Remove loose operation in Dialog#render_each_dialog
a6d1c917ce
2022-09-01 14:01:37 +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.

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.

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)
bd49537964
2022-06-27 22:28:49 +09:00
st0012
b1397e96da [ruby/reline] Revert "Merge pull request #441 from nevans/workaround-linker-script-so"
This reverts commit 4ccf128ffa, reversing
changes made to a2651419e9.

51053138a4
2022-06-13 19:33:15 +09:00
nicholas a. evans
d020334e9e [ruby/reline] Workaround libncurses.so as a linker script
This maybe isn't probably isn't the best approach, but it will allow
`Fiddle::Terminfo.curses_dl` to work.  I documented more details about
this in an issue on fiddle: https://github.com/ruby/fiddle/issues/107

It is probably better to deal with it there.  But this is workaround is
simpler.

FYI: `reline` itself seems to be working just fine for me _without_
loading ncurses.  But I wanted to be able to use `Reline::Terminfo` for
my own projects. :)

fd4bdb35e2
2022-05-25 06:34:28 +09:00
ima1zumi
bcdbfe4b6e
[ruby/reline] Require Ruby >= 2.6
fix https://github.com/ruby/reline/pull/428

dae9eca323
2022-05-20 17:49:15 +09:00
Tim Pope
37d5890e49 [ruby/reline] Fix support for emacs-ctlx and emacs-meta keymaps
The existing implementation, given the below .inputrc, erroneously
creates a "C-v" key binding:

	set keymap emacs-ctlx
	"\C-v": "[C-x C-v was pressed]"

This fixes it to instead create a "C-x C-v" keybinding.

719f52d231
2022-02-22 18:52:52 +09:00
aycabta
d66e7ec77b [ruby/reline] Add a comment for VK_MENU
ee307c2b01
2022-01-27 20:54:09 +09:00
aycabta
f4ee60543a [ruby/reline] The AltGr behaves exactly the same as Ctrl+Alt
On European keyboards.

75fe9759a4
2022-01-27 20:54:09 +09:00
Postmodern
c155445752 [ruby/reline] Ignore global constants when checking if Fiddle::VERSION exists
If a top-level `VERSION` constant exists, or if a module containing a `VERSION` constant is included into the top-level scope, then `Fiddle.const_defined?(:VERSION)` will erroneously return true when `RUBY_VERSION < 3.0.0`.

8529c8e47a
2022-01-24 07:00:34 +09:00
aycabta
f5e3913737 [ruby/reline] Fix incremental search to work correctly even if not last line
21d75f6d4c
2022-01-16 22:09:31 +09:00
aycabta
921ff739df [ruby/reline] Insert newline in the middle of buffer just after dialog
0c76631132
2022-01-16 22:09:31 +09:00
aycabta
2bc6b07a8d [ruby/reline] Combine common logic into one
5db9738f17
2022-01-16 22:09:29 +09:00
aycabta
f94a2adf6a [ruby/reline] Clear dialog when adding new line to end of buffer
7d38454327
2022-01-16 22:09:28 +09:00
aycabta
9e79ae539b [ruby/reline] Clear dialog when just_move_cursor is called with dialog at last line
05024b968e
2022-01-11 06:10:37 +09:00
Peter Zhu
09cfc653b7 [ruby/reline] Fix reline on Solaris
Solaris requires that the pointer errret_int is alined to an integer,
however, with VWA, strings are no longer aligned to an integer, so use a
Fiddle::Pointer with a malloc'd region instead.

5fcd89ab0c
2022-01-08 20:32:06 +09:00
aycabta
76181ae940 [ruby/reline] Check capname of tigetstr/tigetflag/tigetnum
Incorrect arguments can cause SEGV.

a58748bcf9
2022-01-02 11:44:07 +09:00
aycabta
6d1b406dc8 [ruby/reline] Version 0.3.1
9ab5850444
2022-01-02 11:24:14 +09:00
aycabta
85f304b931 [ruby/reline] Implement Reline::Terminfo.tigetnum
695212d5d2
2022-01-02 10:27:09 +09:00
aycabta
530586fafc [ruby/reline] Fix the difinition of tigetflag() in comment...
af4d77ba09
2022-01-02 00:39:45 +09:00
aycabta
7deee741ab [ruby/reline] Remove unnecessary qualifiers on definition of comments
abc1e4ee88
2022-01-01 23:12:07 +09:00
aycabta
6300c4dcc3 [ruby/reline] Implement Reline::Terminfo.tigetflag
0451ed7a28
2022-01-01 23:06:53 +09:00
YO4
31c69d66d2 [ruby/reline] windows fix scroll
c559d0f7a9
2021-12-30 20:53:21 +09:00
ima1zumi
f589242e75 [ruby/reline] Use unix_line_discard when Ctrl-u is entered
The kill-line was called when C-u was entered, so it is now called unix-line-discard.

In readline(3):

> unix-line-discard (C-u)
>               Kill backward from point to the beginning of the line.
>               The killed text is saved on the kill-ring.

27570d195e
2021-12-30 20:23:58 +09:00