summaryrefslogtreecommitdiff
path: root/lib/reline.rb
AgeCommit message (Collapse)Author
2021-08-31[ruby/reline] Fix Reline::Unicode.take_range as it was not fully functionalaycabta
https://github.com/ruby/reline/commit/5da6a8d851
2021-08-31[ruby/reline] Pass "dialog" to context to get "dialog.scroll_top" lateraycabta
https://github.com/ruby/reline/commit/d81f29a134
2021-08-31[ruby/reline] Autocompletion dialog height 15aycabta
https://github.com/ruby/reline/commit/7e18716754
2021-08-31[ruby/reline] Scroll autocompletion pointer in dialog correctlyaycabta
https://github.com/ruby/reline/commit/dc79ed2dd8
2021-08-31[ruby/reline] Use DialogRenderInfo structaycabta
https://github.com/ruby/reline/commit/ac6f652a39
2021-08-30[ruby/reline] Fix Reline.autocompletion=() interfaceaycabta
https://github.com/ruby/reline/commit/71c2eb143d
2021-08-30[ruby/reline] Add Reline.autocompletion=() interfaceaycabta
https://github.com/ruby/reline/commit/a2e69f6277
2021-08-30[ruby/reline] Add autocompletion on emacs mode by Tab / S-Tabaycabta
https://github.com/ruby/reline/commit/22d0b4e5d8
2021-08-29[ruby/reline] Make autocomplete dialog is registered firstaycabta
https://github.com/ruby/reline/commit/d027dbe118
2021-08-29[ruby/reline] Delete show doc dialog to move it to IRBaycabta
https://github.com/ruby/reline/commit/640102fe27
2021-08-29[ruby/reline] Remove an unnecessary variableaycabta
https://github.com/ruby/reline/commit/3b8cc5ce0a
2021-08-29[ruby/reline] Remove dialog_proc_list accessor of Relineaycabta
https://github.com/ruby/reline/commit/ac8fa84f4d
2021-08-29[ruby/reline] Move constants of dialogs to under Relineaycabta
https://github.com/ruby/reline/commit/9100ea2934
2021-08-29[ruby/reline] Use default dialog context to communicate othersaycabta
https://github.com/ruby/reline/commit/5e67e6ffe0
2021-08-29[ruby/reline] Use colored doc output with ANSI escape sequenceaycabta
https://github.com/ruby/reline/commit/7d1c75b43f
2021-08-29[ruby/reline] Support custom bg coloraycabta
https://github.com/ruby/reline/commit/cd0cbf53d5
2021-08-29[ruby/reline] Show method or class doc correctlyaycabta
https://github.com/ruby/reline/commit/a505294f12
2021-08-29[ruby/reline] Implement doc display dialog in conjunction with autocompleteaycabta
https://github.com/ruby/reline/commit/e97bbc4ccf
2021-08-29[ruby/reline] Add the ability to handle context between dialogsaycabta
https://github.com/ruby/reline/commit/063d9c70d9
2021-08-29[ruby/reline] Support for multiple dialog renderingaycabta
https://github.com/ruby/reline/commit/f589fab718
2021-08-29[ruby/reline] Cut out the autocomplete callbackaycabta
https://github.com/ruby/reline/commit/46aa2694da
2021-08-29[ruby/reline] Implement dynamic selection of candidatesaycabta
https://github.com/ruby/reline/commit/e46437df00
2021-08-29[ruby/reline] Remove unnecessary conditionaycabta
https://github.com/ruby/reline/commit/07e911ec8e
2021-08-29[ruby/reline] Fix typoaycabta
https://github.com/ruby/reline/commit/6370353c71
2021-08-29[ruby/reline] Show autocomplete correctly when starts from prev lineaycabta
https://github.com/ruby/reline/commit/f31a76ff31
2021-08-29[ruby/reline] Display autocomplete below original line if end point was wrappedaycabta
https://github.com/ruby/reline/commit/49f3392d59
2021-08-29[ruby/reline] Implement dialog with autocomplete callbackaycabta
https://github.com/ruby/reline/commit/1401d6165e
2021-07-30[ruby/reline] Add require 'reline/terminfo' to use Reline::Terminfo.enabled?aycabta
https://github.com/ruby/reline/commit/7ef9805b35
2021-06-21Rescue conversion error of inputrcaycabta
2021-06-21[ruby/reline] Fix explamation of #read_ioaycabta
https://github.com/ruby/reline/commit/301ed11bec
2021-06-21[ruby/reline] Fix Reline::Unicode.calculate_width when input is not a TTYJeremy Evans
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-04-08[ruby/reline] Separate keystrokes each editing modeaycabta
https://github.com/ruby/reline/commit/ee23e6f3f8
2021-03-24[ruby/reline] Add Reline.ungetc to control bufferaycabta
https://github.com/ruby/reline/commit/43ac03c624
2021-02-07[ruby/reline] Cache pasting state in processing a keyaycabta
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
2020-12-22[ruby/reline] [ruby/reline] Remove unused `attr_writer`ima1zumi
https://github.com/ruby/reline/commit/ecdc1b7116 https://github.com/ruby/reline/commit/a7922da16b
2020-12-22[ruby/reline] Fixed an exception occurred when ambiguous width character was ↵ima1zumi
passed to `#calculate_width` [Bug #17405] https://github.com/ruby/reline/commit/f79b4c857f
2020-12-17[ruby/reline] Make a log file on windows if debug env is setaycabta
https://github.com/ruby/reline/commit/dff30a2d44
2020-12-05[ruby/reline] Support bracketed paste modeaycabta
https://github.com/ruby/reline/commit/d1a6869322
2020-12-05[ruby/reline] Suppress callbacks in pastingaycabta
IRB uses Reline's 3 dynamic real-time callbacks with calling Ripper; output_modifier_proc, prompt_proc, and auto_indent_proc. These processing times make the paste time too long. https://github.com/ruby/reline/commit/beec3399a8
2020-08-18[ruby/reline] Add require 'rbconfig' to use RbConfigaycabta
https://github.com/ruby/reline/commit/4a0d32a3d0
2020-08-18[ruby/reline] Support mode iconMark Delk
Co-authored-by: aycabta <aycabta@gmail.com> https://github.com/ruby/reline/commit/067b618123
2020-08-18[ruby/reline] Check Errno::EIOaycabta
Catch Errno::EIO what will be occurred if the console terminates I/O before Reline finishes rendering. https://github.com/ruby/reline/commit/e51eaa6d43
2020-05-14Reline callbacks can take nilaycabta
2020-03-26[ruby/reline] Suppress error when check ambiguous char width in LANG=Caycabta
https://github.com/ruby/reline/commit/623dffdd75
2020-03-26[ruby/reline] Work with wrong $/ value correctlyaycabta
https://github.com/ruby/reline/commit/962ebf5a1b
2020-02-14[ruby/reline] Use IO#write instead of IO#printaycabta
IO#print always adds a string of $\ automatically. https://github.com/ruby/reline/commit/a93119c847
2020-01-26Always refer to Reline::IOGate.encodingaycabta
2020-01-21Reline: Use a more robust detection of MinTTYLars Kanis
The previous detection per get_screen_size fails when stdout is passed to a pipe. That is the case when running ruby tests in parallel ("-j" switch). In this case Reline believes that it's running on MinTTY and the tests are running with ANSI IOGate instead of the Windows adapter on MINGW. So parallel test results were different to that of a single process. This commit fixes these differencies. The code is taken from git sources and translated to ruby. NtQueryObject() is replaced by GetFileInformationByHandleEx(), because NtQueryObject() is undocumented and is more difficult to use: https://github.com/git-for-windows/git/blob/c5a03b1e29c69f3f06c8fabd92493edb73469176/compat/winansi.c#L558 Notes: Merged: https://github.com/ruby/ruby/pull/2848
2020-01-14Introduce an abstracted structure about the encoding of Relineaycabta
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.
2019-12-17[ruby/reline] Implement completion_append_characterThomas Leitner
There is already the possibility to set Reline.completion_append_character. However, it is not used by the line editor. https://github.com/ruby/reline/commit/ab798931b9