summaryrefslogtreecommitdiff
path: root/lib/reline/line_editor.rb
AgeCommit message (Collapse)Author
2020-12-05[ruby/reline] Call process_insert when the end of pasting plural fullwidth charsaycabta
https://github.com/ruby/reline/commit/594484d9f9
2020-12-05[ruby/reline] Motions e, E, t, f should include a char on cursor if follows ↵aycabta
operator https://github.com/ruby/reline/commit/86e9a76499
2020-12-05[ruby/reline] Implement vi_yankaycabta
https://github.com/ruby/reline/commit/164aaf9a5f
2020-12-05[ruby/reline] Operator with arg need to make sure that they take arg to ↵aycabta
avoid crashing https://github.com/ruby/reline/commit/1c0c06de1f
2020-12-05[ruby/reline] Unimplemented vi command should be no-opaycabta
https://github.com/ruby/reline/commit/abc90e6867
2020-12-05[ruby/reline] Keep operator proc as a local variable in the scopeaycabta
The proc variable will be used later so the instance variable will be changes. https://github.com/ruby/reline/commit/496c4361f6
2020-12-05[ruby/reline] Skip em_exchange_mark without markaycabta
https://github.com/ruby/reline/commit/abb56e5ec3
2020-12-05[ruby/reline] Continuous insertion bufferingaycabta
The rendering time in IRB has been reduced as follows: start = Time.now [{"_id"=>"5f9072a4589a06d2d74b6028", "index"=>0, "guid"=>"6b3051e2-dbc7-4537-bdb9-6cd7bb5358a7", "isActive"=>true, "balance"=>"$1,442.84", "picture"=>"http://placehold.it/32x32", "age"=>34, "eyeColor"=>"blue", "name"=>{"first"=>"Ward", "last"=>"Levy"}, "company"=>"HYPLEX", "email"=>"ward.levy@hyplex.us", "phone"=>"+1 (867) 568-3319", "address"=>"867 Cobek Court, Clara, Maryland, 3254", "about"=> "Exercitation eu ex aliqua sit. Pariatur aliquip incididunt sint id non consectetur ullamco Lorem ea mollit duis amet sint labore. Commodo laborum labore commodo officia in cillum adipisicing esse excepteur cupidatat adipisicing ut. Non esse incididunt voluptate aliquip cillum eu aute duis laboris sit et. Amet enim quis tempor occaecat excepteur exercitation excepteur deserunt amet cillum adipisicing.", "registered"=>"Monday, May 25, 2015 6:51 AM", "latitude"=>"16.001127", "longitude"=>"-72.377848", "tags"=>["dolore", "nostrud", "occaecat", "cillum", "nisi"], "range"=>[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "friends"=> [{"id"=>0, "name"=>"Alison Bryant"}, {"id"=>1, "name"=>"Ester Espinoza"}, {"id"=>2, "name"=>"Sullivan Kane"}], "greeting"=>"Hello, Ward! You have 7 unread messages.", "favoriteFruit"=>"apple"}] puts "Duration: #{Time.now - start} seconds" 2.17sec -> 0.92sec start = Time.now "Exercitation eu ex aliqua sit. Pariatur aliquip incididunt sint id non consectetur ullamco Lorem ea mollit duis amet sint labore. Commodo laborum labore commodo officia in cillum adipisicing esse excepteur cupidatat adipisicing ut. Non esse incididunt voluptate aliquip cillum eu aute duis laboris sit et. Amet enim quis tempor occaecat excepteur exercitation excepteur deserunt amet cillum adipisicing." puts "Duration: #{Time.now - start} seconds" 1.57sec -> 0.22sec 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.88sec -> 0.77sec https://github.com/ruby/reline/commit/7d87ac5a12
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-12-05[ruby/reline] Deduplicate completed itemsaycabta
https://github.com/ruby/reline/commit/2dabf0c786
2020-09-12[ruby/reline] Treat prompt correctly when Reline.prompt_proc isn't setaycabta
https://github.com/ruby/reline/commit/9c9ba0eff3
2020-09-12[ruby/reline] Move cursor to currect vertical pos after rendering a logical lineaycabta
https://github.com/ruby/reline/commit/9b932df544
2020-09-12[ruby/reline] Stop using chomp option of lines methodaycabta
https://github.com/ruby/reline/commit/3e2f55c3e0
2020-09-12[ruby/reline] Stop erasing chars after the cursor at eolaycabta
When the cursor is at the end of the line and erases characters after the cursor, some terminals delete the character at the cursor position. https://github.com/ruby/reline/commit/e96ec97b02
2020-09-09Revert the related commits about `Tempfile.open` change.Hiroshi SHIBATA
Start with https://github.com/ruby/ruby/commit/fa21985a7a2f8f52a8bd82bd12a724e9dca74934 to https://github.com/ruby/ruby/commit/d7492a0be885ea9f2b9f71e3e95582f9a859c439
2020-08-29Fix usages of Tempfile.open(&block) that expected the file to still be there ↵Benoit Daloze
after the block
2020-08-28[ruby/reline] Move width calculator methods to Reline::Unicodeaycabta
https://github.com/ruby/reline/commit/f348ecd9f5
2020-08-18[ruby/reline] Get rid of loading pathname unnecessarilyNobuyoshi Nakada
https://github.com/ruby/reline/commit/9bd54b7f1c
2020-08-18[ruby/reline] Remove duplicated line of codeaycabta
Co-authored-by: Quentin Sabah <quentin.sabah@gmail.com> https://github.com/ruby/reline/commit/5526e9f7ee
2020-08-18[ruby/reline] Support mode iconMark Delk
Co-authored-by: aycabta <aycabta@gmail.com> https://github.com/ruby/reline/commit/067b618123
2020-05-17[ruby/reline] Remove unnecessary TODO commnetaycabta
https://github.com/ruby/reline/commit/23c67fb7b3
2020-04-18[ruby/reline] Add ed_search_next_historyaycabta
https://github.com/ruby/reline/commit/ca750b676b
2020-04-18[ruby/reline] Add ed_search_prev_historyaycabta
https://github.com/ruby/reline/commit/e9ae288825
2020-04-18[ruby/reline] Use vi_search_{prev,next} to incremental searchaycabta
https://github.com/ruby/reline/commit/cab312f584
2020-04-18[ruby/reline] Rename search_history with incremental_search_historyaycabta
https://github.com/ruby/reline/commit/d563063ea0
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-02-02[ruby/reline] Bypass cursor down when a char is rendered at eol on Windowsaycabta
A newline is automatically inserted if a character is rendered at eol on Windows command prompt. https://github.com/ruby/reline/commit/4bfea07e4a
2020-01-21[ruby/reline] Implement vi_change_metaaycabta
https://github.com/ruby/reline/commit/8538e0e10f
2020-01-20[ruby/reline] Implement vi_prev_char and vi_to_prev_charaycabta
https://github.com/ruby/reline/commit/0ad3ee63fa
2020-01-20[ruby/reline] Implement vi_to_next_charaycabta
https://github.com/ruby/reline/commit/066ecb0a21
2020-01-17Implement vi_insert_at_bol and vi_add_at_eolaycabta
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.
2020-01-06Complete indented and quoted string correctlyaycabta
def foo ''.upca[TAB] This will be completed to be: def foo ''.upcase The indent was gone. This commit fixes the bug.
2020-01-05[ruby/reline] Sort completion listKOBAYASHI Shuji
#### Legacy mode: ```console $ irb --legacy irb(main):001:0> l[TAB][TAB] lambda load local_variables loop ``` #### Before this patch: ```console $ irb irb(main):001:0> l[TAB][TAB] local_variables loop lambda load ``` #### After this patch: ```console $ irb irb(main):001:0> l[TAB][TAB] lambda load local_variables loop ``` https://github.com/ruby/reline/commit/6074069c7d
2019-12-27Drop an invalid char as UTF-8aycabta
2019-12-25Save last breaking point to completeaycabta
2019-12-25The behavior of vi_end_of_transmission should be the same of vi_list_or_eofaycabta
2019-12-25^D on non-empty line in vi mode behaves like Enteraycabta
2019-12-24Remove unused variableaycabta
2019-12-24The delete-char-or-list shows completed list when called at end of lineaycabta
It doesn't behave the same as the delete-char.
2019-12-20Fixed misspellingsNobuyoshi Nakada
Fixed misspellings reported at [Bug #16437], for default gems.
2019-12-17Remove an unnecessary variableaycabta
2019-12-17Remove unnecessary branchesaycabta
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
2019-12-17Support change search directionaycabta
2019-12-17Support forward-search-history by C-saycabta
2019-12-13Show a menu before a documentaycabta
IRB should show a menu first if a completed list has plural items. But just shows document without menu if a completed list with plural items includes a perfect matched item. The behavior is a bug. This commit fixes it.
2019-12-12Suppress to crash IRB if completed list has nilaycabta
2019-12-11Add a message for CompatibilityErroraycabta