aboutsummaryrefslogtreecommitdiffstats
path: root/lib/reline/line_editor.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* [ruby/reline] Remove unnecessary variables, lower_spaceaycabta2021-12-131-3/+2
| | | | | | | | The number of lines below the cursor position was known by "@rest_height" alone, but the problem was caused by adding "lower_space". Remove "lower_space" as it is unnecessary. https://github.com/ruby/reline/commit/a575cef6a3
* [ruby/reline] Correct padding space calculationima1zumi2021-11-211-1/+2
| | | | | | | | | | | | fix https://github.com/ruby/irb/issues/308 This bug occurred when `dialog.width - calculate_width(s, true)` was negative. When `dialog.width` is shorter than `old_dialog.width`, it calculates how much padding it has to do. However, there are cases where `s` is longer than `dialog.width`, as in the issue. In that case, `padding_space_with_escape_sequences` will crash. Here, `old_dialog.width` is longer than `dialog.width`, so I changed the padding width to `old_dialog.width - dialog.width`. https://github.com/ruby/reline/commit/c581c31e0f
* [ruby/reline] Revert "Fix zero division when the screen width is not available"Nobuyoshi Nakada2021-10-121-2/+1
| | | | | | This reverts commit 0dce9da083541f42c31822a91c72f339934c3986. https://github.com/ruby/reline/commit/f71471cdde
* [ruby/reline] Fix zero division when the screen width is not availableNobuyoshi Nakada2021-10-121-1/+2
| | | | https://github.com/ruby/reline/commit/0dce9da083
* [ruby/reline] Add RELINE_ALT_SCROLLBAR env to use alternative text for scrollbaraycabta2021-10-091-1/+6
| | | | | | The setting to use '::' instead of block elements. https://github.com/ruby/reline/commit/4afbc98e2c
* [ruby/reline] Fix calculating dialog width with full-width scrollbaraycabta2021-10-091-2/+2
| | | | https://github.com/ruby/reline/commit/93bc9b5277
* [ruby/reline] Use alternate text for scrollbar in non-UTF-8 envaycabta2021-10-081-11/+15
| | | | https://github.com/ruby/reline/commit/69e365edcc
* [ruby/reline] Better fix for non-UTF-8 default external encodingJeremy Evans2021-10-081-4/+10
| | | | | | | Previous fix didn't show the cursor or dialogs. This allows the dialogs to continue to work. https://github.com/ruby/reline/commit/651c5f63cc
* [ruby/reline] Only show dialogs if default external encoding is UTF-8Jeremy Evans2021-10-081-0/+1
| | | | | | | | | Fixes a crash in IRB if a dialog is displayed and the default external encoding is not UTF-8: /home/jeremy/tmp/reline/lib/reline/line_editor.rb:731:in `write': U+2588 from UTF-8 to US-ASCII (Encoding::UndefinedConversionError) https://github.com/ruby/reline/commit/f570525ecd
* [ruby/reline] Cut off the excess on narrow screenaycabta2021-10-081-0/+4
| | | | https://github.com/ruby/reline/commit/972cc993ca
* [ruby/reline] Rename DIALOG_HEIGHT with DIALOG_DEFAULT_HEIGHTaycabta2021-10-081-2/+2
| | | | https://github.com/ruby/reline/commit/996bfec64b
* [ruby/reline] The width of block elements is 1 on Windowsaycabta2021-10-051-1/+5
| | | | https://github.com/ruby/reline/commit/5f4a75c7a0
* [ruby/reline] Re-calc the scroll pos when the content in dialog is shortenedaycabta2021-10-031-0/+3
| | | | https://github.com/ruby/reline/commit/12ea63e6e0
* [ruby/reline] Initialize @trap_key to suppress warningaycabta2021-10-031-0/+1
| | | | https://github.com/ruby/reline/commit/b42c0980d9
* [ruby/reline] Add a comment to use "private alias_method" idiom after drop ↵aycabta2021-10-031-0/+1
| | | | | | Ruby 2.5 https://github.com/ruby/reline/commit/1b00cae0fd
* [ruby/reline] Add code block notation in docaycabta2021-10-031-1/+1
| | | | https://github.com/ruby/reline/commit/b283791dc5
* [ruby/reline] Add doc for ed-unassigned and ed-insert macroaycabta2021-10-031-0/+15
| | | | https://github.com/ruby/reline/commit/7fe9ecf945
* [ruby/reline] Rerender whole buffer when argument editing finishedaycabta2021-10-031-3/+12
| | | | | | | If the argument prompt disappears when pasting is finished, rerender the whole buffer. https://github.com/ruby/reline/commit/996bbf8797
* [ruby/reline] Simplify SIGWINCH handler to avoid aborting when resizing.TOMITA Masahiro2021-10-031-34/+41
| | | | https://github.com/ruby/reline/commit/481add0537
* [ruby/reline] Adjust border of scrollbar rendering calculationaycabta2021-10-031-2/+2
| | | | https://github.com/ruby/reline/commit/737b23beae
* [ruby/reline] The @block_elem_width shouldn't be used for height calculationaycabta2021-10-031-2/+2
| | | | https://github.com/ruby/reline/commit/da35902d78
* [ruby/reline] Support ed_argument_digit by M+numaycabta2021-09-291-2/+11
| | | | | | | | | 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
* [ruby/reline] Ignore NUL by ed_quoted_insertaycabta2021-09-281-0/+2
| | | | https://github.com/ruby/reline/commit/43b7c01a98
* [ruby/reline] ^K is kill-line and ^U is unix-line-discard for inputrcaycabta2021-09-271-1/+2
| | | | https://github.com/ruby/reline/commit/5936071940
* [ruby/reline] Implement vi_kill_line_prevJake Zimmerman2021-09-261-0/+1
| | | | | | | | | | | 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
* [ruby/reline] Add aliases {prev,next}_history to ed_{prev,next}_historyaycabta2021-09-251-0/+2
| | | | https://github.com/ruby/reline/commit/d740e18cff
* [ruby/reline] Use SGR 0 instead of SGR 39 and 49 to reset font settingsaycabta2021-09-241-6/+6
| | | | https://github.com/ruby/reline/commit/cbacb4c1cf
* [ruby/reline] Reset all font settings at left end of dialogaycabta2021-09-231-2/+1
| | | | https://github.com/ruby/reline/commit/5f293b5127
* [ruby/reline] Move #pointer from DialogRenderInfo to Dialogaycabta2021-09-101-9/+9
| | | | https://github.com/ruby/reline/commit/92dbac0bff
* [ruby/reline] Erase lines correctly when dialog height is changedaycabta2021-09-101-6/+6
| | | | https://github.com/ruby/reline/commit/68d2516551
* [ruby/reline] Render scrollbar when the column of the dialog is movedaycabta2021-09-081-1/+1
| | | | https://github.com/ruby/reline/commit/5cea268e56
* [ruby/reline] Remove variables that have no meaning in calculationsaycabta2021-09-081-5/+3
| | | | https://github.com/ruby/reline/commit/3b7a1900fd
* [ruby/reline] Remove garbage left behind when rerendering the right side of ↵aycabta2021-09-081-3/+4
| | | | | | the dialog https://github.com/ruby/reline/commit/d89c23e30b
* [ruby/reline] Move only one line when render a line and then go to the next lineaycabta2021-09-081-1/+1
| | | | https://github.com/ruby/reline/commit/8a966cd962
* [ruby/reline] The #reset_dialog should also use calculated block elem widthaycabta2021-09-081-2/+2
| | | | https://github.com/ruby/reline/commit/577df401b9
* [ruby/reline] Remove debug printaycabta2021-09-081-1/+0
| | | | https://github.com/ruby/reline/commit/6f82177f2e
* [ruby/reline] Calculate block elem width only onceaycabta2021-09-081-6/+6
| | | | https://github.com/ruby/reline/commit/3054a67d05
* [ruby/reline] Ensure that scrollbar is only rerendered when the position is ↵aycabta2021-09-081-16/+21
| | | | | | changed https://github.com/ruby/reline/commit/f629853eae
* [ruby/reline] The width of Block Elements in Unicode is East Asian Ambiguousaycabta2021-09-081-4/+5
| | | | https://github.com/ruby/reline/commit/05e8ab8cbb
* [ruby/reline] Remove SIG prefix because don't use it in any other signal ↵aycabta2021-09-071-2/+2
| | | | | | processing https://github.com/ruby/reline/commit/37648042e8
* [ruby/reline] Use String for the value to be passed because Signal.trap also ↵aycabta2021-09-071-2/+2
| | | | | | returns String https://github.com/ruby/reline/commit/b908fe4439
* [ruby/reline] Rescue ArgumentError from Signal.trap(:TSTP) on Windowsaycabta2021-09-071-5/+11
| | | | https://github.com/ruby/reline/commit/8da8182d1c
* [ruby/reline] Trap TSTP to handle C-zaycabta2021-09-071-0/+5
| | | | https://github.com/ruby/reline/commit/ebbd0076b8
* [ruby/reline] Set scrollbar coloraycabta2021-09-061-5/+9
| | | | https://github.com/ruby/reline/commit/d7962e420d
* [ruby/reline] Support multiple trap_keyaycabta2021-09-061-1/+5
| | | | https://github.com/ruby/reline/commit/b0207fa049
* [ruby/reline] Support oneshot key bindings config for key_trap of dialog ↵aycabta2021-09-061-5/+14
| | | | | | callbacks https://github.com/ruby/reline/commit/5f1141b693
* [ruby/reline] Correct misalignment of scrollbaraycabta2021-09-041-3/+3
| | | | https://github.com/ruby/reline/commit/7924b4cfc6
* [ruby/reline] Implement scrollbaraycabta2021-09-041-0/+19
| | | | https://github.com/ruby/reline/commit/4c7fc42151
* [ruby/reline] Add Reline::Key#match?aycabta2021-09-031-1/+3
| | | | https://github.com/ruby/reline/commit/8f6aa3af2e
* [ruby/reline] Add key accessor for dialog callbacksaycabta2021-09-031-3/+21
| | | | https://github.com/ruby/reline/commit/c949e44a14