Samuel Williams
bf376cae0c
[ruby/reline] Fix missing require.
...
010b28dfe9
2021-06-25 17:42:45 +09:00
Samuel Williams
e788481843
[ruby/reline] Avoid using blocking IO.select
.
...
de94746393
2021-06-25 17:42:45 +09:00
aycabta
8135f489be
[ruby/reline] Add binding C-x C-x to em_exchange_mark on Windows
...
24a2489b62
2021-06-21 17:58:49 +09:00
aycabta
18b79b4c49
[ruby/reline] Add Meta+arrow-keys in extended entries of terminfo
...
af6f6ed088
2021-06-21 17:58:48 +09:00
aycabta
5e09da2f7a
[ruby/reline] Terminfo.tigetstr and tiparm should return String object
...
1e287d10cc
2021-06-21 17:58:48 +09:00
aycabta
46c813969b
[ruby/reline] Add terminfo support
...
74a7ffaa2f
2021-06-21 17:58:48 +09:00
aycabta
1b543dc226
[ruby/reline] Handle Errno::ENOTTY correctly
...
8daa392ba6
2021-06-21 17:58:48 +09:00
aycabta
5543695a19
[ruby/reline] Separate keystrokes each editing mode
...
ee23e6f3f8
2021-04-08 21:41:00 +09:00
Robert Schulze
422e2c7274
[ruby/reline] Use plus operator to create unfrozen string
...
ca274b0d37
2020-12-17 20:20:07 +09:00
Robert Schulze
f4386413f1
Cope with frozen-string-literal
...
When running irb 1.2.1 (2019-12-24) with frozen-string-literal enabled, it crashes in reline with `can't modify frozen String (FrozenError)`
Steps to reproduce:
`RUBYOPT="--enable-frozen-string-literal" irb`
2020-12-05 03:14:42 +09:00
aycabta
c2bd5b84d0
[ruby/reline] Support bracketed paste mode
...
d1a6869322
2020-12-05 02:58:59 +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.
beec3399a8
2020-12-05 02:58:58 +09:00
aycabta
777d536749
[ruby/reline] Support for word movement escape sequences in iTerm2
...
187235f88c
2020-09-12 08:35:52 +09:00
aycabta
2e34b35a0f
[ruby/reline] Skip the nil obtained from getc
...
The nil means there is nothing in the buffer in some systems. Incidentally,
Errno::EIO is raised if the I/O is closed.
c698634e74
2020-09-12 08:35:52 +09:00
tompng
cdd7d41046
[ruby/reline] fix cursor_pos regexp match
...
1dd80ef188
2020-08-28 11:05:18 +09:00
Nobuyoshi Nakada
4f697bcf73
Strip trailing spaces [ci skip]
2020-08-18 20:10:34 +09:00
aycabta
215fe54777
[ruby/reline] Check Errno::EIO
...
Catch Errno::EIO what will be occurred if the console terminates I/O before
Reline finishes rendering.
e51eaa6d43
2020-08-18 19:04:31 +09:00
Tomás Pollak
f0d3d4fedb
[ruby/reline] Add home/end mapping for urxvt and relatives
...
c30b293f1c
2020-08-18 19:03:27 +09:00
aycabta
7a7854d8c1
Some I/O in test doesn't have "position"
...
Just returns column 1 for ambiguous width because this I/O is not tty and can't
seek.
2020-05-12 02:53:44 +09:00
aycabta
2efb38e766
[ruby/reline] Use IO#write instead of IO#print
...
IO#print always adds a string of $\ automatically.
a93119c847
2020-02-14 22:47:27 +09:00
aycabta
97b583d68b
[ruby/reline] Organize special keys escape sequences
...
41deb1a3d9
2020-02-09 02:54:41 +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.
4bfea07e4a
2020-02-02 03:28:20 +09:00
aycabta
5d124a3b68
[ruby/reline] Support GNOME style Home/End key sequences [Bug #16510 ]
...
788f0df845
2020-01-29 15:11:59 +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
da028a4fbf
Rescue EOFError
...
If C-d is pressed before IRB is ready, IRB crashes because EOFError occurs.
2020-01-05 22:48:39 +09:00
Yusuke Endoh
337ba56aff
[ruby/reline] Degenerate the terminal size to [$LINES, $COLUMNS] if it is unknown
...
This is a workaround for https://github.com/ruby/irb/issues/50
5725677d1a
2019-12-31 23:32:24 +09:00
Nobuyoshi Nakada
679bc4f9cb
[ruby/reline] Use IO#raw to read one byte
...
be17740e82
2019-12-23 02:11:22 +09:00
Nobuyoshi Nakada
efd4a11ada
Support multibyte input
2019-12-22 11:46:43 +09:00
Yusuke Endoh
fa1bf8ab37
[ruby/reline] Support Ctrl+right as em_next_word, and Ctrl+left as ed_prev_word
...
e98ad3b486
2019-12-22 05:35:03 +09:00
Yusuke Endoh
ec1de789a9
[ruby/reline] Preserve the input buffer across cursor_pos
...
The old version of cursor_pos discards the input buffer, which made IRB
ignore the input immediately after IRB is invoked.
This change keeps the input before cursor_pos by using ungetc.
4a8cca331f
2019-12-22 01:57:35 +09:00
Nobuyoshi Nakada
7fd6077d98
[ruby/reline] Consider Reline::ANSI.input at prep
...
b111cde3c3
2019-12-22 01:57:35 +09:00
Nobuyoshi Nakada
11db4d3a3b
[ruby/reline] Disable any implementation-defined special control characters
...
Including dsusp, lnext, and so on.
a44abe586b
2019-12-17 13:19:37 +09:00
manga_osyo
81586a4d9f
Add <Home> <End> keys.
2019-11-21 00:47:36 +09:00
Nobuyoshi Nakada
cef9ebfbd3
Suppress stty
error on Apple Terminal
...
`stty` called in `Reline::ANSI.deprep` command shows the following
error message on macOS Apple Terminal, with some settings.
```
$ LANG=C irb
irb(main):001:0>
stty: 'standard input': unable to perform all requested operations
stty: 'standard input': unable to perform all requested operations
```
2019-11-19 02:39:02 +09:00
aycabta
11ae47c266
[ruby/reline] Restore left cursor key support on Unix like OSes...
...
98b72af751
2019-11-15 18:07:34 +09:00
aycabta
fa7618e4c1
Implement em_set_mark and em_exchange_mark
2019-11-15 16:50:40 +09:00
aycabta
53c05a6cf4
Remove freeze
2019-10-18 02:54:20 +09:00
Nobuyoshi Nakada
ae83dbe28d
Get rid of IO.select
to fix multiline paste
2019-09-26 00:26:33 +09:00
aycabta
b443bdbdb9
Use short wait for select(2)
...
It is one of the reasons why paste to IRB is slow.
2019-09-23 17:33:25 +09:00
aycabta
934507472c
Retrieve key-buffer that was supposed to lose
2019-09-23 17:27:01 +09:00
Nobuyoshi Nakada
68ffb679d4
Undefine DSUSP key
...
Enable `Ctrl+Y`, which is bound with it by default on BSD-like
systems, for editing.
2019-09-17 15:16:12 +09:00
aycabta
83ef23bd75
Revert "Use IO#getch to read one char in raw mode"
...
This reverts commit 805b0a4811
.
2019-09-14 00:11:01 +09:00
aycabta
e8fff0ec9c
Revert "Use IO#getbyte"
...
This reverts commit 685f12bbca
.
2019-09-14 00:10:45 +09:00
aycabta
06bbacc086
Revert "Support multibyte input"
...
This reverts commit 6d9e54816f
.
2019-09-14 00:10:34 +09:00
Nobuyoshi Nakada
6d9e54816f
Support multibyte input
2019-09-10 00:56:31 +09:00
Nobuyoshi Nakada
685f12bbca
Use IO#getbyte
2019-09-10 00:56:31 +09:00
Nobuyoshi Nakada
805b0a4811
Use IO#getch to read one char in raw mode
2019-09-10 00:56:31 +09:00
aycabta
0f405541bf
Support SIGWINCH
2019-08-29 14:37:19 +09:00
Nobuyoshi Nakada
fc7b4c7018
Simplify matching
2019-06-04 00:33:56 +09:00
aycabta
7df65ef676
Use inputrc data for keystroke setting
2019-06-01 09:06:27 +09:00