Граф коммитов

19 Коммитов

Автор SHA1 Сообщение Дата
Stan Lo 7c226291d3 [ruby/reline] Remove Timeout usage
(https://github.com/ruby/reline/pull/580)

Timeout's implementation relies on Thread, which would conflict with
`ruby/debug`'s thread-freezing implementation and has casued issues like

- ruby/debug#877
- ruby/debug#934
- ruby/debug#1000

This commit avoids the issue by completely removing the use of Timeout.

https://github.com/ruby/reline/commit/d4f0cd3fe1
2023-08-20 10:40:55 +00:00
tomoya ishida 92ed8e6f3f [ruby/reline] Fix the cause of test_yamatanooroti randomly failing
(https://github.com/ruby/reline/pull/474)

* Add repeated input-delete test that fails on HEAD

* Use raw mode while readmultiline
2023-02-27 08:44:02 +00:00
Hiroshi SHIBATA 7ff50ee35c [ruby/reline] Added some of abstruct methods for cursor
https://github.com/ruby/reline/commit/f5fa30d595
2022-09-02 16:09:50 +09:00
Samuel Williams b5c4570af4 [ruby/reline] Prefer wait_readable for fiber scheduler.
https://github.com/ruby/reline/commit/06b4aa31fd
2021-12-11 14:29:20 +09:00
aycabta ba0464e0cf Reline::GeneralIO should work fine without tty 2021-09-01 17:29:01 +09:00
Jeremy Evans 242bad9a87 [ruby/reline] Fix Reline::Unicode.calculate_width when input is not a TTY
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-06-21 17:58:48 +09:00
aycabta b0cc46b484 [ruby/reline] The config file must accept any character encoding
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
2021-06-21 17:58:48 +09:00
aycabta 5543695a19
[ruby/reline] Separate keystrokes each editing mode
https://github.com/ruby/reline/commit/ee23e6f3f8
2021-04-08 21:41:00 +09:00
aycabta 9750c27afc [ruby/reline] Call process_insert when the end of pasting plural fullwidth chars
https://github.com/ruby/reline/commit/594484d9f9
2020-12-05 02:58:58 +09:00
aycabta 55cc397a87 [ruby/reline] Suppress callbacks in pasting
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 02:58:58 +09:00
aycabta 06c37fa5b4 [ruby/reline] Bypass cursor down when a char is rendered at eol on Windows
A newline is automatically inserted if a character is rendered at eol on
Windows command prompt.

https://github.com/ruby/reline/commit/4bfea07e4a
2020-02-02 03:28:20 +09:00
aycabta c257d81186 Always use UTF-8 for Reline::GeneralIO on Windows 2020-01-26 12:57:13 +09:00
aycabta f8ea2860b0 Introduce an abstracted structure about the encoding of Reline
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-14 15:40:38 +09:00
aycabta 53c05a6cf4 Remove freeze 2019-10-18 02:54:20 +09:00
aycabta 893900dc78 Add stub set_screen_size for other platforms 2019-08-29 15:21:00 +09:00
aycabta 7df65ef676 Use inputrc data for keystroke setting 2019-06-01 09:06:27 +09:00
Nobuyoshi Nakada 552c42f51f
Seprate raw keystroke config for each platforms 2019-06-01 00:41:17 +09:00
aycabta eb4e774711 Support Meta key in Reline 2019-05-24 23:38:40 +09:00
aycabta 0f45bd0584 Split namespace of env-dependent I/O classes 2019-05-13 00:22:27 +09:00