aboutsummaryrefslogtreecommitdiffstats
path: root/lib/reline/line_editor.rb
Commit message (Collapse)AuthorAgeFilesLines
* [ruby/reline] Remove FIXME comment in #renderaycabta2021-06-211-1/+0
| | | | https://github.com/ruby/reline/commit/acd8f8efbb
* [ruby/reline] Remove TODO comment in #render_partialaycabta2021-06-211-1/+0
| | | | https://github.com/ruby/reline/commit/bb6ea232c2
* [ruby/reline] Reset @rest_height when clear screenaycabta2021-04-021-0/+1
| | | | https://github.com/ruby/reline/commit/3a7019b0d5
* [ruby/reline] Suppress crashing when completer_{quote,word_break}_characters ↵aycabta2021-03-241-4/+12
| | | | | | is empty https://github.com/ruby/reline/commit/c6f1164942
* [ruby/reline] Support preposing and postposing for Reline.completion_procaycabta2021-03-241-2/+32
| | | | https://github.com/ruby/reline/commit/1f469de90c
* [ruby/reline] Reline.delete_text removes the current line in multilineaycabta2021-03-241-4/+26
| | | | https://github.com/ruby/reline/commit/da90c094a1
* [ruby/reline] Use UTF-8 only for width calc, rest uses original encodingaycabta2021-02-211-2/+3
| | | | | | | | | | 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
* [ruby/reline] check ENABLE_VIRTUAL_TERMINAL_PROCESSING flag and switch eof ↵Yoshinao Muramatu2021-02-211-2/+2
| | | | | | processing https://github.com/ruby/reline/commit/3535676689
* [ruby/reline] We still need support new and legacy behavior.Yoshinao Muramatu2021-02-211-7/+15
| | | | | | | | Revert "Support for change in Windows-specific behavior at eol" This reverts commit cad4de6ee841b43f3f0e441626f9415c3eda0f82. https://github.com/ruby/reline/commit/646587fc2c
* [ruby/reline] Avoid tripping over nil promptEamonn Webster2021-02-211-0/+1
| | | | https://github.com/ruby/reline/commit/d4d9d3e3d4
* [ruby/reline] Terminate correctly in the middle of lines higher than the screenaycabta2021-02-071-4/+18
| | | | https://github.com/ruby/reline/commit/e1d9240ada
* [ruby/reline] Autowrap correctly when inserting chars in the middle of a lineaycabta2021-02-071-1/+1
| | | | https://github.com/ruby/reline/commit/ebaf37255f
* [ruby/reline] The vi_histedit supports multilineaycabta2021-02-071-2/+14
| | | | | | This closes ruby/reline#253. https://github.com/ruby/reline/commit/f131f86d71
* [ruby/reline] Move cursor just after the last line when finishedaycabta2021-02-071-0/+1
| | | | https://github.com/ruby/reline/commit/ba06e4c480
* [ruby/reline] Update cursor info by inserting newline even if not in pastingaycabta2021-02-071-1/+1
| | | | https://github.com/ruby/reline/commit/92d314f514
* [ruby/reline] Handle past logs correctly when the code is higher than the screenaycabta2021-02-071-2/+7
| | | | https://github.com/ruby/reline/commit/f197139b4a
* [ruby/reline] Show all lines higher than the screen when finishedaycabta2021-02-071-0/+13
| | | | | | | | 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
* [ruby/reline] Scroll down when ^C is pressedaycabta2021-02-071-0/+8
| | | | https://github.com/ruby/reline/commit/6877a7e3f5
* [ruby/reline] Remove an unused variableaycabta2021-02-071-1/+0
| | | | https://github.com/ruby/reline/commit/123ea51166
* [ruby/reline] Initialize uninitialized variables in testsaycabta2021-02-071-0/+2
| | | | https://github.com/ruby/reline/commit/25af4bb64b
* [ruby/reline] Cache pasting state in processing a keyaycabta2021-02-071-13/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [ruby/reline] Support for change in Windows-specific behavior at eolaycabta2021-01-181-15/+7
| | | | | | | 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
* [ruby/reline] Initialize a variable just in caseaycabta2021-01-181-0/+1
| | | | https://github.com/ruby/reline/commit/29b10f6e98
* [ruby/reline] Move the cursor correctly when deleting at eolaycabta2021-01-131-0/+3
| | | | | | This fixes ruby/reline#246. https://github.com/ruby/reline/commit/07a73ba601
* [ruby/reline] Handle ed_search_{prev,next}_history in multiline correctlyaycabta2021-01-131-2/+2
| | | | | | | 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
* [ruby/reline] Suppress auto indent for adding newlines in pastingaycabta2021-01-081-1/+1
| | | | | | Co-authored-by: Juanito Fatas <me@juanitofatas.com> https://github.com/ruby/reline/commit/074bb017a7
* [ruby/reline] Suppress crashing when dynamic_prompt_proc returns a broken ↵aycabta2021-01-081-0/+7
| | | | | | | | prompt list Co-authored-by: Juanito Fatas <me@juanitofatas.com> https://github.com/ruby/reline/commit/558f7be168
* [ruby/reline] Suppress crashing when auto_indent_proc returns broken indent infoaycabta2021-01-081-0/+1
| | | | | | Co-authored-by: Juanito Fatas <me@juanitofatas.com> https://github.com/ruby/reline/commit/7c24276275
* [ruby/reline] Correct var names in Reline were different from vi-*-mode-stringaycabta2021-01-081-16/+16
| | | | https://github.com/ruby/reline/commit/8255fc93b9
* [ruby/reline] Update cursor correctly when just cursor movingaycabta2021-01-081-1/+3
| | | | | | This fixes ruby/reline#236 and ruby/reline#239. https://github.com/ruby/reline/commit/3e3c89d00b
* [ruby/reline] Doesn't contain terminate spaces by cwaycabta2020-12-241-1/+4
| | | | | | This closes ruby/reline#233. https://github.com/ruby/reline/commit/4c3f2e2eae
* [ruby/reline] Use #bytesize for vi_replace_charaycabta2020-12-241-2/+2
| | | | | | This closes ruby/reline#228. https://github.com/ruby/reline/commit/8205fa0b00
* [ruby/reline] Suppress crashing when boken prompt_list is givenaycabta2020-12-241-0/+1
| | | | https://github.com/ruby/reline/commit/922d087e7a
* [ruby/reline] Discard prompt cache by changing mode iconaycabta2020-12-241-25/+30
| | | | https://github.com/ruby/reline/commit/bfeda8a79b
* [ruby/reline] Support isearch-terminatorsaycabta2020-12-221-1/+3
| | | | https://github.com/ruby/reline/commit/a7922da16b
* [ruby/reline] Render refreshed prompt just after i-search finishedaycabta2020-12-221-0/+4
| | | | https://github.com/ruby/reline/commit/0d3188fe34
* [ruby/reline] Use cached prompt list when just moved the cursoraycabta2020-12-191-1/+9
| | | | https://github.com/ruby/reline/commit/cfe619460b
* [ruby/reline] Yank by em-kill-region correctlyaycabta2020-12-191-1/+3
| | | | | | This closes ruby/reline#106. https://github.com/ruby/reline/commit/2549a52e15
* [ruby/reline] Bind yank-pop correctlyaycabta2020-12-191-0/+2
| | | | https://github.com/ruby/reline/commit/3c74beac65
* [ruby/reline] Support longer than screen heightaycabta2020-12-171-59/+162
| | | | https://github.com/ruby/reline/commit/e83a3de9ed
* Fixing glitchy kill ring behavior in irbYale Kozinski2020-12-171-1/+1
| | | | See https://github.com/ruby/irb/issues/85 for details
* [ruby/reline] Fix breaking to input Emoji with ZWJ.ima1zumi2020-12-111-0/+5
| | | | https://github.com/ruby/reline/commit/f21dfdbb11
* [ruby/reline] Editing to initial content is not just cursor movingaycabta2020-12-081-1/+2
| | | | https://github.com/ruby/reline/commit/0a4f175b0a
* [ruby/reline] Process insertion buffer forciblyaycabta2020-12-051-0/+1
| | | | https://github.com/ruby/reline/commit/89d49ec9e0
* [ruby/reline] Forced newline insertion is not just cursor movingaycabta2020-12-051-2/+8
| | | | https://github.com/ruby/reline/commit/0e30a49d03
* [ruby/reline] Drop prompt list cache when num of lines is changedaycabta2020-12-051-1/+3
| | | | https://github.com/ruby/reline/commit/1959e22043
* [ruby/reline] Cache dynamic prompt for 0.5secaycabta2020-12-051-1/+8
| | | | https://github.com/ruby/reline/commit/06b89d0e61
* [ruby/reline] Stop rerendering if the cursor is only movedaycabta2020-12-051-0/+33
| | | | https://github.com/ruby/reline/commit/30e8eaf855
* [ruby/reline] Split #rerender method that is too hugeaycabta2020-12-051-145/+167
| | | | https://github.com/ruby/reline/commit/d0fbc89253
* [ruby/reline] Stop rerendering whole screen when adding newline at end of bufferaycabta2020-12-051-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.33sec -> 0.22sec https://github.com/ruby/reline/commit/496c6a1892