aboutsummaryrefslogtreecommitdiffstats
path: root/lib/reline/general_io.rb
Commit message (Collapse)AuthorAgeFilesLines
* [ruby/reline] Fix Reline::Unicode.calculate_width when input is not a TTYJeremy Evans2021-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [ruby/reline] The config file must accept any character encodingaycabta2021-06-211-2/+9
| | | | | | | | | | In Japan, so many programmers used EUC-JP to write text files that contain Japanese. Many .inputrc files which contain EUC-JP are still being copied and used. This commit supports the whole encoding of what user set including UTF-8. ref. https://github.com/ruby/reline/pull/280 https://github.com/ruby/reline/commit/0b45022e16
* [ruby/reline] Separate keystrokes each editing modeaycabta2021-04-081-1/+2
| | | | https://github.com/ruby/reline/commit/ee23e6f3f8
* [ruby/reline] Call process_insert when the end of pasting plural fullwidth charsaycabta2020-12-051-1/+15
| | | | https://github.com/ruby/reline/commit/594484d9f9
* [ruby/reline] Suppress callbacks in pastingaycabta2020-12-051-0/+4
| | | | | | | | 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
* [ruby/reline] Bypass cursor down when a char is rendered at eol on Windowsaycabta2020-02-021-0/+4
| | | | | | | A newline is automatically inserted if a character is rendered at eol on Windows command prompt. https://github.com/ruby/reline/commit/4bfea07e4a
* Always use UTF-8 for Reline::GeneralIO on Windowsaycabta2020-01-261-1/+1
|
* Introduce an abstracted structure about the encoding of Relineaycabta2020-01-141-0/+4
| | | | | | 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.
* Remove freezeaycabta2019-10-181-1/+1
|
* Add stub set_screen_size for other platformsaycabta2019-08-291-0/+3
|
* Use inputrc data for keystroke settingaycabta2019-06-011-1/+1
|
* Seprate raw keystroke config for each platformsNobuyoshi Nakada2019-06-011-0/+2
|
* Support Meta key in Relineaycabta2019-05-241-0/+7
|
* Split namespace of env-dependent I/O classesaycabta2019-05-131-0/+55