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

688 Коммитов

Автор SHA1 Сообщение Дата
aycabta 6cb37d4136 [ruby/reline] Initialize @trap_key to suppress warning
https://github.com/ruby/reline/commit/b42c0980d9
2021-10-03 21:38:05 +09:00
aycabta bf4f3ef5ad [ruby/reline] Add a comment to use "private alias_method" idiom after drop Ruby 2.5
https://github.com/ruby/reline/commit/1b00cae0fd
2021-10-03 18:41:29 +09:00
aycabta b91b3000bd [ruby/reline] Add code block notation in doc
https://github.com/ruby/reline/commit/b283791dc5
2021-10-03 15:31:47 +09:00
aycabta bc5407f00c [ruby/reline] Add doc for ed-unassigned and ed-insert macro
https://github.com/ruby/reline/commit/7fe9ecf945
2021-10-03 15:25:50 +09:00
aycabta 95522ef8b9 [ruby/reline] Rerender whole buffer when argument editing finished
If the argument prompt disappears when pasting is finished, rerender the
whole buffer.

https://github.com/ruby/reline/commit/996bbf8797
2021-10-03 14:53:13 +09:00
aycabta bf0a8a7462 [ruby/reline] Call LineEditor#resize on Windows
https://github.com/ruby/reline/commit/65b27dd2ff
2021-10-03 14:27:33 +09:00
TOMITA Masahiro ef350b3a56 [ruby/reline] Simplify SIGWINCH handler to avoid aborting when resizing.
https://github.com/ruby/reline/commit/481add0537
2021-10-03 14:26:53 +09:00
aycabta 4401bbe8a7 [ruby/reline] Use String#unpack1
https://github.com/ruby/reline/commit/179c52bca8
2021-10-03 14:08:55 +09:00
aycabta a2d2f00e4a [ruby/reline] Adjust border of scrollbar rendering calculation
https://github.com/ruby/reline/commit/737b23beae
2021-10-03 14:08:49 +09:00
aycabta 1d2edda9f8 [ruby/reline] The @block_elem_width shouldn't be used for height calculation
https://github.com/ruby/reline/commit/da35902d78
2021-10-03 14:08:45 +09:00
aycabta 5eb8b6d1bd [ruby/reline] Support ed_argument_digit by M+num
The vi mode can handle "argument number" before an operator or a motion,
such as, "3x" (equals "xxx"), and "3l" (equals "lll"). In the emacs
mode, GNU Readline can handle argument number with meta key, like
"Meta+3 x" (equals "xxx").

https://github.com/ruby/reline/commit/9183cc2e8b
2021-09-29 22:07:49 +09:00
aycabta c4acde8959 [ruby/reline] Ignore NUL by ed_quoted_insert
https://github.com/ruby/reline/commit/43b7c01a98
2021-09-28 14:15:49 +09:00
aycabta a230ff0f83 [ruby/reline] ^K is kill-line and ^U is unix-line-discard for inputrc
https://github.com/ruby/reline/commit/5936071940
2021-09-27 01:16:15 +09:00
Jake Zimmerman 3f7b08d2cb [ruby/reline] Implement vi_kill_line_prev
This operation is mentioned and bound to `^U` in both `vi_command.rb`
and `vi_insert.rb`, but there is no definition of it.

Both Vi and Emacs use the same keystroke to do the same behavior, so
I've chosen to use `alias_method` to make the implementation small,
rather than duplicating the method and re-implementing it.

https://github.com/ruby/reline/commit/fdbfc8669f
2021-09-26 23:47:11 +09:00
aycabta f726c79d74 [ruby/reline] Add aliases {prev,next}_history to ed_{prev,next}_history
https://github.com/ruby/reline/commit/d740e18cff
2021-09-25 00:11:44 +09:00
aycabta 63aba76893 [ruby/reline] Use SGR 0 instead of SGR 39 and 49 to reset font settings
https://github.com/ruby/reline/commit/cbacb4c1cf
2021-09-24 03:08:33 +09:00
aycabta 3b5923bca3 [ruby/reline] Reset all font settings at left end of dialog
https://github.com/ruby/reline/commit/5f293b5127
2021-09-23 23:41:55 +09:00
Kazuhiro NISHIYAMA 357406da8b [ruby/reline] Use `unpack1` instead of `unpack(template)[0]`
https://github.com/ruby/reline/commit/45aa367616
2021-09-22 23:37:59 +09:00
ima1zumi 616d671758 [ruby/reline] Remove unused using method
follow #347

https://github.com/ruby/reline/commit/37453a83a3
2021-09-14 22:28:50 +09:00
aycabta 8de53fb31c [ruby/reline] Use expanded method definitions instead of refinements
@jhawthorn said, "this will make Ruby's integer comparisons slower
globally." It looks like "binding.irb" is going to cause serious
problems in Rails applications.

https://github.com/ruby/reline/commit/ee8d6c6a82
2021-09-13 05:15:47 +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 fbfa0c880d [ruby/reline] Version 0.2.8.pre.9
https://github.com/ruby/reline/commit/bad76b5a87
2021-09-10 10:59:40 +09:00
aycabta 5af602e4d4 [ruby/reline] Erase lines correctly when dialog height is changed
https://github.com/ruby/reline/commit/68d2516551
2021-09-10 09:05:25 +09:00
aycabta e4eb085329 [ruby/reline] Render scrollbar when the column of the dialog is moved
https://github.com/ruby/reline/commit/5cea268e56
2021-09-08 03:34:51 +09:00
aycabta 8b6d757ba0 [ruby/reline] Remove variables that have no meaning in calculations
https://github.com/ruby/reline/commit/3b7a1900fd
2021-09-08 03:34:46 +09:00
aycabta 11a00e3fa2 [ruby/reline] Remove garbage left behind when rerendering the right side of the dialog
https://github.com/ruby/reline/commit/d89c23e30b
2021-09-08 03:34:40 +09:00
aycabta 95089ddaf4 [ruby/reline] Move only one line when render a line and then go to the next line
https://github.com/ruby/reline/commit/8a966cd962
2021-09-08 01:11:13 +09:00
aycabta 6faf653ab0 [ruby/reline] The #reset_dialog should also use calculated block elem width
https://github.com/ruby/reline/commit/577df401b9
2021-09-08 00:13:21 +09:00
aycabta 5a01da7a29 [ruby/reline] Remove debug print
https://github.com/ruby/reline/commit/6f82177f2e
2021-09-08 00:08:48 +09:00
aycabta b766214851 [ruby/reline] Calculate block elem width only once
https://github.com/ruby/reline/commit/3054a67d05
2021-09-08 00:08:43 +09:00
aycabta 0ef3d574a0 [ruby/reline] Ensure that scrollbar is only rerendered when the position is changed
https://github.com/ruby/reline/commit/f629853eae
2021-09-08 00:08:38 +09:00
aycabta 30486d9150 [ruby/reline] The width of Block Elements in Unicode is East Asian Ambiguous
https://github.com/ruby/reline/commit/05e8ab8cbb
2021-09-08 00:04:40 +09:00
aycabta b4d9126e43 [ruby/reline] Refactor the merging key bindings to make it more readable
https://github.com/ruby/reline/commit/59665a22de
2021-09-07 03:23:33 +09:00
aycabta 2441bc8ea9 [ruby/reline] Change the comment about key bindings to more appropriate
https://github.com/ruby/reline/commit/4364d9a386
2021-09-07 03:23:26 +09:00
aycabta cec50ec8d6 [ruby/reline] Remove SIG prefix because don't use it in any other signal processing
https://github.com/ruby/reline/commit/37648042e8
2021-09-07 02:42:42 +09:00
aycabta f927614e55 [ruby/reline] Use String for the value to be passed because Signal.trap also returns String
https://github.com/ruby/reline/commit/b908fe4439
2021-09-07 02:42:38 +09:00
aycabta 4885a61b12 [ruby/reline] Rescue ArgumentError from Signal.trap(:TSTP) on Windows
https://github.com/ruby/reline/commit/8da8182d1c
2021-09-07 01:59:13 +09:00
aycabta e8ad881336 [ruby/reline] Trap TSTP to handle C-z
https://github.com/ruby/reline/commit/ebbd0076b8
2021-09-07 01:59:05 +09:00
aycabta 3cef8869b0 [ruby/reline] Version 0.2.8.pre.8
https://github.com/ruby/reline/commit/967e19786d
2021-09-06 16:10:22 +09:00
manga_osyo 97a569c648 [ruby/reline] Memoize path of `.inputrc` [Ref #319]
When `ENV["HOME"] = "foo"` on irb, an exception is raised when retrieving the path of `.inputrc`.
Memoize the path of `.inputrc` and don't get the path after the second time.

https://github.com/ruby/reline/commit/7b90b16165
2021-09-06 07:05:52 +09:00
aycabta 32ff4a8c93 [ruby/reline] Set scrollbar color
https://github.com/ruby/reline/commit/d7962e420d
2021-09-06 05:35:03 +09:00
aycabta 79652c5873 [ruby/reline] Support multiple trap_key
https://github.com/ruby/reline/commit/b0207fa049
2021-09-06 05:24:05 +09:00
aycabta d07060c42a [ruby/reline] No need to use max_by when array.size == 1
https://github.com/ruby/reline/commit/7e56c8af05
2021-09-06 05:23:55 +09:00
aycabta 8913b9b742 [ruby/reline] Use sort.last instead of sort.reverse.first
https://github.com/ruby/reline/commit/67f1d8d2d2
2021-09-06 05:23:46 +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 544cd3fb91 [ruby/reline] Support oneshot key bindings config for key_trap of dialog callbacks
https://github.com/ruby/reline/commit/5f1141b693
2021-09-06 05:23:06 +09:00
aycabta e68a586263 [ruby/reline] Add that Reline::Unicode.take_range is cutting based on width
https://github.com/ruby/reline/commit/18405d9594
2021-09-06 05:22:36 +09:00
aycabta 1fe604a675 [ruby/reline] Add comments about optimizing chars in ASCII range of UTF-8
https://github.com/ruby/reline/commit/3c13d93486
2021-09-06 05:22:29 +09:00
aycabta 03e9887d2e [ruby/reline] Correct misalignment of scrollbar
https://github.com/ruby/reline/commit/7924b4cfc6
2021-09-04 21:40:17 +09:00
aycabta ec36ceb072 [ruby/reline] Implement scrollbar
https://github.com/ruby/reline/commit/4c7fc42151
2021-09-04 21:40:12 +09:00
aycabta 36afcf1e15 [ruby/reline] Version 0.2.8.pre.7
https://github.com/ruby/reline/commit/c77c3c6fae
2021-09-04 02:17:50 +09:00
aycabta 057ab5f056 [ruby/reline] Emulate Unix like terminals that sends Alt+key as \e+key
https://github.com/ruby/reline/commit/dc2cf90fa6
2021-09-03 04:27:53 +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 38ae3b8e36 [ruby/reline] Add key accessor for dialog callbacks
https://github.com/ruby/reline/commit/c949e44a14
2021-09-03 04:27:42 +09:00
aycabta f3fe3511da [ruby/reline] Swap the order of initialization for readability
https://github.com/ruby/reline/commit/d53749b208
2021-09-03 03:32:12 +09:00
aycabta 93080111cd [ruby/reline] Fix autocomplete dialog width
https://github.com/ruby/reline/commit/9868432687
2021-09-03 03:32:07 +09:00
aycabta a0a5bdb3ae [ruby/reline] Version 0.2.8.pre.6
https://github.com/ruby/reline/commit/175d5ad4c4
2021-09-02 22:16:36 +09:00
aycabta afa4b59e06 [ruby/reline] Clear only necessary parts when dialog disappearing
https://github.com/ruby/reline/commit/46ff0ff435
2021-09-02 17:11:21 +09:00
aycabta 4208cd0301 [ruby/reline] Shrink the dialog height when contents is shorter than it
https://github.com/ruby/reline/commit/a18817635f
2021-09-02 17:11:14 +09:00
aycabta a44d28db9f [ruby/reline] Fix a misalignment when dialog is shown on top
https://github.com/ruby/reline/commit/0527b1a492
2021-09-02 17:11:09 +09:00
aycabta 123fcc8c92 [ruby/reline] Remove an unnsed constant
https://github.com/ruby/reline/commit/44da8a6b9e
2021-09-02 17:11:01 +09:00
aycabta 4852d87a81 [ruby/reline] Fix a crash when completing empty line
https://github.com/ruby/reline/commit/8226ae7e57
2021-09-02 14:07:48 +09:00
aycabta 5f23003cc2 [ruby/reline] Fix a crash when completing after 2nd line
https://github.com/ruby/reline/commit/f9d3480c34
2021-09-02 14:07:40 +09:00
aycabta f9bdb17c02 [ruby/reline] Use padding_space_with_escape_sequences to padding spaces in reset_dialog
https://github.com/ruby/reline/commit/7d582f4982
2021-09-01 18:05:37 +09:00
aycabta acf11b94d2 [ruby/reline] Cut out a method that calcs width including the escape sequence and padding with spaces
https://github.com/ruby/reline/commit/46c9d944e5
2021-09-01 18:05:30 +09:00
aycabta a669b9661e [ruby/reline] Calc width including escape sequences and padding with spaces correctly
https://github.com/ruby/reline/commit/21c795e97f
2021-09-01 18:05:25 +09:00
aycabta 3bd3adde7c [ruby/reline] Calc width including escape sequences and clear dialog correctly
https://github.com/ruby/reline/commit/9b812d5151
2021-09-01 18:05:20 +09:00
aycabta ba0464e0cf Reline::GeneralIO should work fine without tty 2021-09-01 17:29:01 +09:00
aycabta 9b188ac238 [ruby/reline] Remove one unnecessary nest for simplicity's sake
https://github.com/ruby/reline/commit/f4bda85a7c
2021-08-31 20:48:54 +09:00
aycabta 64373a3c58 Move access to dialog_render_info inside nil check 2021-08-31 20:35:10 +09:00
aycabta 8273e95753 [ruby/reline] Version 0.2.8.pre.5
https://github.com/ruby/reline/commit/79b7d80fee
2021-08-31 15:22:05 +09:00
aycabta 7afb5b8b95 [ruby/reline] Use Reline::Unicode.take_range to devide exactly by width
https://github.com/ruby/reline/commit/de1ad93f44
2021-08-31 15:19:44 +09:00
aycabta 4f5166e790 [ruby/reline] Check if dialog_render_info is nil or not
https://github.com/ruby/reline/commit/e2b87fe831
2021-08-31 15:19:37 +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 7fae57dbb4 [ruby/reline] Use dynamic contents width
https://github.com/ruby/reline/commit/f0e54f239b
2021-08-31 15:19:25 +09:00
aycabta a598730e79 [ruby/reline] Remove an unused variable
https://github.com/ruby/reline/commit/0ae7d8b336
2021-08-31 05:45:02 +09:00
aycabta bb2b5052f5 [ruby/reline] Version 0.2.8.pre.4
https://github.com/ruby/reline/commit/059d39b090
2021-08-31 05:28:17 +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 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 0c09418fff [ruby/reline] Fix dialog rendering at the bottom edge
https://github.com/ruby/reline/commit/860be91bd7
2021-08-31 05:26:28 +09:00
aycabta b6b2b767ed [ruby/reline] Version 0.2.8.pre.3
https://github.com/ruby/reline/commit/6e0ea3362a
2021-08-30 02:37:23 +09:00
aycabta e1ee7f9ced [ruby/reline] Version 0.2.8.pre.2
https://github.com/ruby/reline/commit/5e3ea74891
2021-08-30 02:37:23 +09:00
aycabta 62555d7ae6 [ruby/reline] Set autocompletion is false by default
For compatibility with ext/readline.

https://github.com/ruby/reline/commit/13d9b936bc
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 11b825076b [ruby/reline] Add config.autocompletion
https://github.com/ruby/reline/commit/3d918e4ccb
2021-08-30 02:37:23 +09:00
aycabta 8876710f2a [ruby/reline] Version 0.2.8.pre.1
https://github.com/ruby/reline/commit/2668715509
2021-08-29 20:30:33 +09:00
aycabta b023ef8594 [ruby/reline] Clear dialog by C-c
https://github.com/ruby/reline/commit/f66a079c85
2021-08-29 20:30:33 +09:00
aycabta d41d41da38 [ruby/reline] Clear completion journey data when finished
https://github.com/ruby/reline/commit/03716a411e
2021-08-29 20:30:33 +09:00
aycabta 3d757ba1b6 [ruby/reline] Suppress crashes on nil
https://github.com/ruby/reline/commit/b5f62c366b
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 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 164e486225 [ruby/reline] Remove @dialog_updown and @dialog_contents_width
https://github.com/ruby/reline/commit/458cb8a9cc
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 fdc005e54e [ruby/reline] Completion journey starts with one of candidates
First one is just original string.

https://github.com/ruby/reline/commit/ccb70cc240
2021-08-29 20:30:33 +09:00
aycabta 475038a622 [ruby/reline] Move cursor correctly when current line is auto wrapped
https://github.com/ruby/reline/commit/14c8fade54
2021-08-29 20:30:33 +09:00
aycabta ff43b0f2dd [ruby/reline] Update dialog backup before clearing
https://github.com/ruby/reline/commit/a39e2c8813
2021-08-29 20:30:33 +09:00
aycabta ca1a2d1f68 [ruby/reline] Show autocomplete correctly when starts from prev line
https://github.com/ruby/reline/commit/f31a76ff31
2021-08-29 20:30:33 +09:00
aycabta 06bd48aba8 [ruby/reline] Remove unnecessary metadata between lines
https://github.com/ruby/reline/commit/83928249e3
2021-08-29 20:30:33 +09:00
aycabta 081e5de34d [ruby/reline] Combine vertical processing into @dialog_vertical_offset
https://github.com/ruby/reline/commit/600b93620c
2021-08-29 20:30:33 +09:00
aycabta f863ed5210 [ruby/reline] Drop too much contents before processing
https://github.com/ruby/reline/commit/94f7027edc
2021-08-29 20:30:33 +09:00
aycabta fb9fe4c43f [ruby/reline] Display autocomplete below original line if end point was wrapped
https://github.com/ruby/reline/commit/49f3392d59
2021-08-29 20:30:33 +09:00
aycabta 9b2afb2eed [ruby/reline] Scroll properly to create margin
https://github.com/ruby/reline/commit/064d54f8f1
2021-08-29 20:30:33 +09:00
aycabta 85dd0ad5e0 [ruby/reline] Move dialog pos to left when goes beyond right edge
https://github.com/ruby/reline/commit/f1efa2b062
2021-08-29 20:30:33 +09:00
aycabta d768eeeddb [ruby/reline] Support hide/show cursor on Windows
https://github.com/ruby/reline/commit/0c870813bd
2021-08-29 20:30:33 +09:00
aycabta 02a61fe33f [ruby/reline] Hide cursor when rendering dialog
https://github.com/ruby/reline/commit/a9050cf676
2021-08-29 20:30:32 +09:00
aycabta c0349765e9 [ruby/reline] Remove debug code
https://github.com/ruby/reline/commit/2389d175f7
2021-08-29 20:30:32 +09:00
aycabta 2ec3977ce2 [ruby/reline] Clear after cursor
https://github.com/ruby/reline/commit/4d7503cd1f
2021-08-29 20:30:32 +09:00
aycabta b95e5f4a41 [ruby/reline] Move cursor to rerender right margin of dialog correctly
https://github.com/ruby/reline/commit/554855013b
2021-08-29 20:30:32 +09:00
usa 788c047695 [ruby/reline] Create windows.rb
see issue #317

https://github.com/ruby/reline/commit/aad164de93
2021-08-29 20:30:32 +09:00
aycabta d7f654ad5a [ruby/reline] Add "sleep 0.01" to Windows event loop
https://github.com/ruby/reline/commit/dfc89eae53
2021-08-29 20:30:32 +09:00
aycabta 6f66927aef [ruby/reline] Add comments about where rerendering
https://github.com/ruby/reline/commit/4406069b7e
2021-08-29 20:30:32 +09:00
aycabta 55459bdd67 [ruby/reline] Use background color instead of border frame
https://github.com/ruby/reline/commit/8f1db0a076
2021-08-29 20:30:32 +09:00
aycabta 6fda457448 [ruby/reline] Suppress warning; unused variable
https://github.com/ruby/reline/commit/74a6124e8d
2021-08-29 20:30:32 +09:00
aycabta 1e527c8a55 [ruby/reline] Remove an unnecessary variable
https://github.com/ruby/reline/commit/5435c1aa3f
2021-08-29 20:30:32 +09:00
aycabta fb0fc20196 [ruby/reline] Implement dialog with autocomplete callback
https://github.com/ruby/reline/commit/1401d6165e
2021-08-29 20:30:32 +09:00
aycabta e66200780b [ruby/reline] Separate calling completion proc with checking args
https://github.com/ruby/reline/commit/3203cb97db
2021-08-29 20:30:32 +09:00
aycabta acce754eb8 [ruby/reline] Remove interrupt avoidance
There used to be a process that did not want to be interrupted by
SIGINT, so it was trapped, but that process is no longer there.

https://github.com/ruby/reline/commit/ba7252a5db
2021-08-14 22:13:31 +09:00
aycabta 5534698b84 [ruby/reline] Version 0.2.7
https://github.com/ruby/reline/commit/040d29b4c0
2021-08-12 19:55:17 +09:00
Nobuyoshi Nakada 3e7fb4b91d
Check the result of tigetstr 2021-08-06 13:34:25 +09:00
Nobuyoshi Nakada 9bfb8ea671
Fix caching of curses_dl 2021-08-06 13:33:47 +09:00
aycabta 7bcbee37b5 Fix the result of checking the existence of constants being reversed 2021-08-06 02:51:10 +09:00
aycabta de93b8b069 Handle SIGINT in other thread correctly
Co-authored-by: Koichi Sasada <ko1@atdot.net>
2021-08-04 18:29:42 +09:00
aycabta 5bb7b57129 Use Symbol of signal for trap 2021-08-04 18:29:42 +09:00
aycabta 1c9cb9da8f [ruby/reline] Support Terminfo on Cygwin and macOS
https://github.com/ruby/reline/commit/b0b75fcd27
2021-07-30 02:27:02 +09:00
aycabta f1b5cb7e5d [ruby/reline] Don't check the existence of Terminfo on Windows
https://github.com/ruby/reline/commit/320f09055c
2021-07-30 02:27:02 +09:00
aycabta b158b4666d [ruby/reline] Check TYPE_VARIADIC
https://github.com/ruby/reline/commit/8e62e46e33
2021-07-30 02:27:02 +09:00
aycabta 0f496b9b29 [ruby/reline] Define StringWithTiparm instead of singular method
https://github.com/ruby/reline/commit/de234dc875
2021-07-30 02:27:02 +09:00
SilverPhoenix99 5b9f3ed326 [ruby/reline] Fixed Ctrl+Enter key in Windows.
https://github.com/ruby/reline/commit/0c38e39023
2021-07-30 02:27:02 +09:00
aycabta 46c6da9c37 [ruby/reline] Check empty .inputrc
https://github.com/ruby/reline/commit/b60b3b76cd
2021-07-30 02:27:02 +09:00
aycabta 51ee24e7f7 [ruby/reline] Add original C function declarations comment for each function
https://github.com/ruby/reline/commit/9a25ee9f12
2021-07-30 02:27:02 +09:00
Jeremy Evans 44a9337a46 [ruby/reline] Fix reline on OpenBSD
OpenBSD doesn't support tiparm, only tparm.  I'm not sure if the
two are compatible, but this at least this allows me to run irb
on OpenBSD.

https://github.com/ruby/reline/commit/0ce2b34e2b
2021-07-30 02:27:02 +09:00
SilverPhoenix99 1bf768d2e1 [ruby/reline] Added support for Numpad divide key on Windows.
https://github.com/ruby/reline/commit/84577da0c4
2021-07-30 02:27:02 +09:00
aycabta 750359ce81 [ruby/reline] Support Enter key of numpad on Windows
The yamatanooroti gem can't emulate numpad key pressing...

https://github.com/ruby/reline/commit/8e9da1aeaf
2021-07-30 02:27:02 +09:00
Lars Kanis 03f8c27179 [ruby/reline] Windows cmd: Don't type anything when pressing ALT keys alone
Fixes #298

https://github.com/ruby/reline/commit/72acfcd27a
2021-07-30 02:27:02 +09:00
aycabta b0633ee4b3 [ruby/reline] Add TODO comment to implement tigetflag() and tigetnum()
https://github.com/ruby/reline/commit/a0d946a398
2021-07-30 02:27:02 +09:00
Samuel Williams bf376cae0c [ruby/reline] Fix missing require.
https://github.com/ruby/reline/commit/010b28dfe9
2021-06-25 17:42:45 +09:00
Samuel Williams e788481843 [ruby/reline] Avoid using blocking `IO.select`.
https://github.com/ruby/reline/commit/de94746393
2021-06-25 17:42:45 +09:00
aycabta 046fd3ac8c Rescue conversion error of inputrc 2021-06-21 22:12:14 +09:00
aycabta 30cc07fdc1 Check Ruby version to use Fiddle with variadic args in test-all 2021-06-21 18:44:10 +09:00
aycabta 90df426426 [ruby/reline] Version 0.2.6
https://github.com/ruby/reline/commit/5917e3a337
2021-06-21 17:58:49 +09:00
aycabta 95a3cdade6 [ruby/reline] Remove FIXME comment in #render
https://github.com/ruby/reline/commit/acd8f8efbb
2021-06-21 17:58:49 +09:00
aycabta b06218ce6f [ruby/reline] Remove TODO comment in #render_partial
https://github.com/ruby/reline/commit/bb6ea232c2
2021-06-21 17:58:49 +09:00
aycabta 8135f489be [ruby/reline] Add binding C-x C-x to em_exchange_mark on Windows
https://github.com/ruby/reline/commit/24a2489b62
2021-06-21 17:58:49 +09:00
aycabta fa5a258e93 [ruby/reline] Treat C-Space as M-Space on Windows
https://github.com/ruby/reline/commit/69beca2863
2021-06-21 17:58:49 +09:00
aycabta 582b5705ab [ruby/reline] Check existance of a constant, Fiddle::VERSION
https://github.com/ruby/reline/commit/4b74c3d83a
2021-06-21 17:58:48 +09:00
aycabta 18b79b4c49 [ruby/reline] Add Meta+arrow-keys in extended entries of terminfo
https://github.com/ruby/reline/commit/af6f6ed088
2021-06-21 17:58:48 +09:00
aycabta 60d1d6aa89 [ruby/reline] Terminfo.tigetstr should be able to receive tiparm in method chain
https://github.com/ruby/reline/commit/4a3e308163
2021-06-21 17:58:48 +09:00
aycabta 5e09da2f7a [ruby/reline] Terminfo.tigetstr and tiparm should return String object
https://github.com/ruby/reline/commit/1e287d10cc
2021-06-21 17:58:48 +09:00
aycabta 46c813969b [ruby/reline] Add terminfo support
https://github.com/ruby/reline/commit/74a7ffaa2f
2021-06-21 17:58:48 +09:00
aycabta 1b543dc226 [ruby/reline] Handle Errno::ENOTTY correctly
https://github.com/ruby/reline/commit/8daa392ba6
2021-06-21 17:58:48 +09:00
Jeremy Evans 242bad9a87 [ruby/reline] Fix Reline::Unicode.calculate_width when input is not a TTY
This fixes an error when output is redirected:

```
$ run_ruby -rreline -e '$stderr.puts Reline::Unicode.calculate_width("\u221a").inspect' </dev/null >/dev/null
/home/jeremy/tmp/ruby/lib/reline/ansi.rb:189:in `raw': Operation not supported by device (Errno::ENODEV)
```

The @@encoding -> defined?(@@encoding) changes is necessary because
without that part of the commit, the following error would be raised
by the above command:

```
/home/jeremy/tmp/reline/lib/reline/general_io.rb:10:in `encoding': uninitialized class variable @@encoding in Reline::GeneralIO (NameError)
```

Problem reported and initial patch for Windows provided by
Richard Sharman.

I tested this only on OpenBSD, but hopefully it works for other
operating systems.

Fixes [Bug #17493]

https://github.com/ruby/reline/commit/c001971bb3
2021-06-21 17:58:48 +09:00
aycabta 26f31f880c [ruby/reline] Treat return key correctly on Windows
To fix Reline::TestRendering#test_binding_for_vi_movement_mode.

https://github.com/ruby/reline/commit/0df3d2a1dc
2021-06-21 17:58:48 +09:00
aycabta b0cc46b484 [ruby/reline] The config file must accept any character encoding
In Japan, so many programmers used EUC-JP to write text files that contain
Japanese. Many .inputrc files which contain EUC-JP are still being copied and
used. This commit supports the whole encoding of what user set including UTF-8.

ref. https://github.com/ruby/reline/pull/280

https://github.com/ruby/reline/commit/0b45022e16
2021-06-21 17:58:48 +09:00
aycabta c59bbd86a6 [ruby/reline] Use ReadConsoleInputW() instead of getwch()
This needs https://github.com/aycabta/yamatanooroti/pull/19, which is released
by yamatanooroti gem 0.0.7, to test with yamatanooroti.

https://github.com/ruby/reline/commit/06c1f45da1
2021-06-21 17:58:48 +09:00
Mark Delk a049dfd10a [ruby/reline] ensure reline's encoding is used when reading inputrc character values
This change ensures we use `Reline::IOGate`'s `encoding` when converting
characters from their integer values.

This fixes an issue that may occur if you have UTF characters in your
`.inputrc`, but your default encoding isn't set.

For example:

```
> 127864.ord.chr
RangeError: 127864 out of char range
from (pry):1:in `chr'
> Reline::IOGate.encoding
=> #<Encoding:UTF-8>
> 127864.ord.chr(Reline::IOGate.encoding)
=> "🍸"
```

https://github.com/ruby/reline/commit/cf372fc0fc
2021-06-21 17:58:48 +09:00
aycabta 6496c76d2a [ruby/reline] Add calling Reline::Config#reset_default_key_bindings to #reset, which is forgot to call 2021-04-09 11:57:28 +09:00
Nobuyoshi Nakada b0b3022f95
[ruby/reline] Moved development dependencies to Gemfile
As expressions in a gemspec file are evaluated at the build time,
but not the run time, the conditional in the gemspec will not work
as intended.

https://github.com/ruby/reline/commit/c09b7c454a
2021-04-08 21:41:00 +09:00
aycabta 5543695a19
[ruby/reline] Separate keystrokes each editing mode
https://github.com/ruby/reline/commit/ee23e6f3f8
2021-04-08 21:41:00 +09:00
aycabta 16f31da92e
[ruby/reline] Check WITH_VTERM env to add vterm gem as dependency
https://github.com/ruby/reline/commit/27b689a7e2
2021-04-08 21:41:00 +09:00
aycabta 47abb70234 [ruby/reline] Use vterm 0.0.5 or newer on Unix like OSes because suppresses SEGV
https://github.com/ruby/reline/commit/7562cf3b5f
2021-04-03 20:22:56 +09:00
aycabta 8a4472fb6d [ruby/reline] Version 0.2.5
https://github.com/ruby/reline/commit/22ce5651e5
2021-04-03 01:28:42 +09:00
aycabta 7e93917458 [ruby/reline] Reset @rest_height when clear screen
https://github.com/ruby/reline/commit/3a7019b0d5
2021-04-02 17:33:48 +09:00
aycabta 89caf51d93 [ruby/reline] Suppress crashing when completer_{quote,word_break}_characters is empty
https://github.com/ruby/reline/commit/c6f1164942
2021-03-24 15:43:34 +09:00
aycabta 758f2b35f9 [ruby/reline] Support preposing and postposing for Reline.completion_proc
https://github.com/ruby/reline/commit/1f469de90c
2021-03-24 15:43:27 +09:00
aycabta 4b33d860e8 [ruby/reline] Reline.delete_text removes the current line in multiline
https://github.com/ruby/reline/commit/da90c094a1
2021-03-24 15:43:19 +09:00
aycabta f0743dd2a4 [ruby/reline] Version 0.2.4
https://github.com/ruby/reline/commit/462f971bd3
2021-02-26 05:24:01 +09:00
cremno a7dda449e8 [ruby/reline] fix Reline::Windows.getconsolemode buffer
use double quotes to properly convert the \000 escape sequence.

https://github.com/ruby/reline/commit/236dfe5683
2021-02-22 12:19:21 +09:00
aycabta aeac4ddcc0 [ruby/reline] Use UTF-8 only for width calc, rest uses original encoding
I confirmed that libvterm supports only which are UTF-8, US ASCII, UK, and
DEC graphics by reading source code, so can't test this patch by
yamatanoorogi gem through vterm gem for now.

This fixes ruby/irb#190.

https://github.com/ruby/reline/commit/44596c0cc7
2021-02-21 06:44:05 +09:00
Yoshinao Muramatu 38d30a6942 [ruby/reline] check ENABLE_VIRTUAL_TERMINAL_PROCESSING flag and switch eof processing
https://github.com/ruby/reline/commit/3535676689
2021-02-21 06:43:52 +09:00
Yoshinao Muramatu 38cefac7ce [ruby/reline] We still need support new and legacy behavior.
Revert "Support for change in Windows-specific behavior at eol"

This reverts commit cad4de6ee841b43f3f0e441626f9415c3eda0f82.

https://github.com/ruby/reline/commit/646587fc2c
2021-02-21 06:43:41 +09:00
Eamonn Webster ac9e3b514b [ruby/reline] Avoid tripping over nil prompt
https://github.com/ruby/reline/commit/d4d9d3e3d4
2021-02-21 06:41:11 +09:00
aycabta dc9e33016c [ruby/reline] Return 1 when char width not found
This fixes ruby/reline#261.

https://github.com/ruby/reline/commit/3cf1213014
2021-02-21 06:41:03 +09:00
aycabta 93ebfed0a9 [ruby/reline] Version 0.2.3
https://github.com/ruby/reline/commit/b26c7d60c8
2021-02-07 05:29:31 +09:00
aycabta 300084a854 [ruby/reline] Terminate correctly in the middle of lines higher than the screen
https://github.com/ruby/reline/commit/e1d9240ada
2021-02-07 05:12:19 +09:00
aycabta fee19da230 [ruby/reline] Autowrap correctly when inserting chars in the middle of a line
https://github.com/ruby/reline/commit/ebaf37255f
2021-02-07 05:12:07 +09:00
aycabta a19ed1623f [ruby/reline] The vi_histedit supports multiline
This closes ruby/reline#253.

https://github.com/ruby/reline/commit/f131f86d71
2021-02-07 05:11:54 +09:00
aycabta a608bb3e9b [ruby/reline] Move cursor just after the last line when finished
https://github.com/ruby/reline/commit/ba06e4c480
2021-02-07 05:11:47 +09:00
aycabta 08162f0e69 [ruby/reline] Update cursor info by inserting newline even if not in pasting
https://github.com/ruby/reline/commit/92d314f514
2021-02-07 05:11:41 +09:00
aycabta b371ca3f4f [ruby/reline] Handle past logs correctly when the code is higher than the screen
https://github.com/ruby/reline/commit/f197139b4a
2021-02-07 05:11:27 +09:00
aycabta bd0f8b36fd [ruby/reline] Show all lines higher than the screen when finished
On Unix-like OSes, logs prior to the screen are not editable. When the code
is higher than the screen, the code is only shown on the screen until input
is finished, but when it is finished, all lines are outputted.

https://github.com/ruby/reline/commit/8cd9132a39
2021-02-07 05:11:13 +09:00
aycabta 03523fdafb [ruby/reline] Scroll down when ^C is pressed
https://github.com/ruby/reline/commit/6877a7e3f5
2021-02-07 05:11:00 +09:00
aycabta ec6929a5dd [ruby/reline] Remove an unused variable
https://github.com/ruby/reline/commit/123ea51166
2021-02-07 05:10:50 +09:00
aycabta 433b975fe8 [ruby/reline] Initialize uninitialized variables in tests
https://github.com/ruby/reline/commit/25af4bb64b
2021-02-07 05:10:36 +09:00
aycabta b69c965f47 [ruby/reline] Cache pasting state in processing a key
Because it's too slow.

The rendering time in IRB has been reduced as follows:

  start = Time.now

  def each_top_level_statement
    initialize_input
    catch(:TERM_INPUT) do
      loop do
        begin
          prompt
          unless l = lex
            throw :TERM_INPUT if @line == ''
          else
            @line_no += l.count("\n")
            next if l == "\n"
            @line.concat l
            if @code_block_open or @ltype or @continue or @indent > 0
              next
            end
          end
          if @line != "\n"
            @line.force_encoding(@io.encoding)
            yield @line, @exp_line_no
          end
          break if @io.eof?
          @line = ''
          @exp_line_no = @line_no

          @indent = 0
        rescue TerminateLineInput
          initialize_input
          prompt
        end
      end
    end
  end

  puts "Duration: #{Time.now - start} seconds"

0.22sec -> 0.14sec

https://github.com/ruby/reline/commit/b8b3dd52c0
2021-02-07 05:09:18 +09:00
aycabta edafde6844 [ruby/irb] [ruby/irb] [ruby/reline] Version 0.2.2
https://github.com/ruby/reline/commit/dfb710946f

https://github.com/ruby/irb/commit/1a1cdf9628

https://github.com/ruby/irb/commit/fe99faf8bd
2021-01-18 02:10:02 +09:00
aycabta e1449ae74f [ruby/reline] Reline::Windows.erase_after_cursor erases attributes too
https://github.com/ruby/reline/commit/68b961dfc7
2021-01-18 02:09:53 +09:00
aycabta 05df7e0d4a [ruby/reline] Support for change in Windows-specific behavior at eol
The behavior of automatically moving the cursor to the next line when
displaying a char at the eol on Windows suddenly disappeared.

https://github.com/ruby/reline/commit/cad4de6ee8
2021-01-18 02:09:43 +09:00
aycabta 1aba1a5103 [ruby/reline] Initialize a variable just in case
https://github.com/ruby/reline/commit/29b10f6e98
2021-01-18 02:07:37 +09:00
aycabta 0e44247508 [ruby/reline] Version 0.2.1
https://github.com/ruby/reline/commit/a3b3c6ee60
2021-01-13 01:12:54 +09:00
aycabta eb5a094fc0 [ruby/reline] Move the cursor correctly when deleting at eol
This fixes ruby/reline#246.

https://github.com/ruby/reline/commit/07a73ba601
2021-01-13 01:12:54 +09:00
aycabta 44817db28b [ruby/reline] Handle ed_search_{prev,next}_history in multiline correctly
The current line was being handled incorrectly when displaying the hit
history, so it has been fixed to be correct.

https://github.com/ruby/reline/commit/a3df4343b3
2021-01-13 01:12:54 +09:00
aycabta a8f4cbeece [ruby/reline] Add acknowledgments and license for rb-readline
https://github.com/ruby/reline/commit/19df59b916
2021-01-08 13:25:18 +09:00
aycabta 01235f800f [ruby/reline] Suppress auto indent for adding newlines in pasting
Co-authored-by: Juanito Fatas <me@juanitofatas.com>

https://github.com/ruby/reline/commit/074bb017a7
2021-01-08 13:25:18 +09:00
aycabta 76c9a3c8c6 [ruby/reline] Suppress crashing when dynamic_prompt_proc returns a broken prompt list
Co-authored-by: Juanito Fatas <me@juanitofatas.com>

https://github.com/ruby/reline/commit/558f7be168
2021-01-08 13:25:18 +09:00
aycabta 88af5085db [ruby/reline] Suppress crashing when auto_indent_proc returns broken indent info
Co-authored-by: Juanito Fatas <me@juanitofatas.com>

https://github.com/ruby/reline/commit/7c24276275
2021-01-08 13:25:18 +09:00
aycabta ea75aed98e [ruby/reline] Correct var names in Reline were different from vi-*-mode-string
https://github.com/ruby/reline/commit/8255fc93b9
2021-01-08 13:25:18 +09:00
aycabta 54c1dcba2b [ruby/reline] Update cursor correctly when just cursor moving
This fixes ruby/reline#236 and ruby/reline#239.

https://github.com/ruby/reline/commit/3e3c89d00b
2021-01-08 13:25:18 +09:00
aycabta 523b520b44 [ruby/reline] 0.2.0
https://github.com/ruby/reline/commit/064664c8f9
2020-12-25 01:29:18 +09:00