| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
https://github.com/ruby/reline/commit/7ef9805b35
|
| |
|
|
|
|
| |
https://github.com/ruby/reline/commit/301ed11bec
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
https://github.com/ruby/reline/commit/ee23e6f3f8
|
|
|
|
| |
https://github.com/ruby/reline/commit/43ac03c624
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
https://github.com/ruby/reline/commit/ecdc1b7116
https://github.com/ruby/reline/commit/a7922da16b
|
|
|
|
|
|
| |
passed to `#calculate_width` [Bug #17405]
https://github.com/ruby/reline/commit/f79b4c857f
|
|
|
|
| |
https://github.com/ruby/reline/commit/dff30a2d44
|
|
|
|
| |
https://github.com/ruby/reline/commit/d1a6869322
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
https://github.com/ruby/reline/commit/4a0d32a3d0
|
|
|
|
|
|
| |
Co-authored-by: aycabta <aycabta@gmail.com>
https://github.com/ruby/reline/commit/067b618123
|
|
|
|
|
|
|
| |
Catch Errno::EIO what will be occurred if the console terminates I/O before
Reline finishes rendering.
https://github.com/ruby/reline/commit/e51eaa6d43
|
| |
|
|
|
|
| |
https://github.com/ruby/reline/commit/623dffdd75
|
|
|
|
| |
https://github.com/ruby/reline/commit/962ebf5a1b
|
|
|
|
|
|
| |
IO#print always adds a string of $\ automatically.
https://github.com/ruby/reline/commit/a93119c847
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
Reline performs completion in a case-insensitive fashon if
Readline.completion_case_fold or completion-ignore-case of .inputrc are set
"on".
|
|
|
|
|
|
| |
In the incremental search by C-r, search word is saved when it's determined. In
the next incremental search by C-r, if a user presses C-r again with the empty
search word, the determined previous search word is used to search.
|
|
|
|
| |
This is the same as the behavior of Readline.
|
| |
|
| |
|
| |
|
|
|
|
| |
Ruby 2.7 deprecates taint and it no longer has an effect.
|
|
|
|
| |
Fixes Ruby Bug 16281.
|
|
|
|
| |
This raised a NameError before.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
RUBY_PLATFORM on JRuby is always "java", so it will not reflect
the host operating system. This regex appears to be the consensus
way to detect Windows based on a search of Ruby code on Github:
https://github.com/search?q=%2Fmswin%7Cmsys%7Cmingw%7Ccygwin%7Cbccwin%7Cwince%7Cemc%2F&type=Code
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|