aycabta
e26c6d4ab8
Collect multiline prompt logic into a method
2019-10-17 01:56:20 +09:00
aycabta
7df227804a
Support multiline history in incremental search
2019-10-16 22:35:58 +09:00
aycabta
259601ab57
Support backspace in incremental search
2019-10-16 02:55:45 +09:00
aycabta
a5245c1658
C-r is incremental history search in vi insert mode
2019-10-16 02:08:52 +09:00
aycabta
f4252f6496
Version 0.0.3
2019-10-07 16:14:03 +09:00
aycabta
a9e9cd2036
Flush console just after printing
2019-10-07 14:15:05 +09:00
aycabta
136116819e
Use built-in Win32API on JRuby
...
It's fixed for JRuby dedicatedly.
2019-10-07 14:15:05 +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
Adam Cammack
f9332ad833
Fix previous history in vi_insert mode
2019-09-17 15:14:38 +09:00
Adam Cammack
a3533bc904
Fix history navigation in vi_insert mode
2019-09-17 15:14:38 +09:00
aycabta
98f919ed47
The stdlib readline should raise Interrupt when pressing C-c
2019-09-14 00:16:31 +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
e9bc8b35c6
Behave ESC key correctly when vi command mode
2019-09-08 03:26:35 +09:00
aycabta
85dc89c907
Treat Japanese IME on/off code correctly
2019-09-02 06:37:25 +09:00
aycabta
11d6094cbe
Reline 0.0.2
2019-09-01 11:23:52 +09:00
aycabta
c5bb074fe7
Re-calculate state variables of screen when screen size changes
2019-09-01 11:02:58 +09:00
aycabta
a39b26b594
Check events that console window size changed on Windows
2019-08-29 21:11:53 +09:00
aycabta
3a425c7623
Fix alignment of a SHORT variable
...
typedef struct _COORD {
SHORT X;
SHORT Y; // I wanted to take this...
} COORD, *PCOORD;
typedef struct _CONSOLE_SCREEN_BUFFER_INFO {
COORD dwSize;
COORD dwCursorPosition; // ...of this one
WORD wAttributes; // But it's combined with first 2bytes of this
SMALL_RECT srWindow;
COORD dwMaximumWindowSize;
} CONSOLE_SCREEN_BUFFER_INFO;
If wAttributes has non-zero value, the code breaks.
2019-08-29 21:05:19 +09:00
aycabta
b74dd665c0
CONSOLE_SCREEN_BUFFER_INFO is 22bytes
...
typedef struct _CONSOLE_SCREEN_BUFFER_INFO {
COORD dwSize; // 4(SHORT X, Y)
COORD dwCursorPosition; // 4
WORD wAttributes; // 2
SMALL_RECT srWindow; // 8(SHORT Left, Top, Right, Bottom)
COORD dwMaximumWindowSize; // 4
} CONSOLE_SCREEN_BUFFER_INFO;
2019-08-29 21:03:44 +09:00
aycabta
893900dc78
Add stub set_screen_size for other platforms
2019-08-29 15:21:00 +09:00
aycabta
0f405541bf
Support SIGWINCH
2019-08-29 14:37:19 +09:00
aycabta
800821831d
Always check multiline termination
2019-08-22 06:02:27 +09:00
aycabta
113a5c1e1d
The "exe" dir doesn't exist in this repostiroy
2019-08-18 08:05:08 +09:00
Alan Wu
e9f82585ee
Don't crash when deleting at the end of the line
...
To reproduce this bug, type one character into irb, then press the
delete key on your keyboard.
2019-08-18 07:43:19 +09:00
Kazuhiro NISHIYAMA
a4a2dd7942
Revert a6e32855d0
partially
...
Fix TypeError when typing `''.[TAB]`
2019-08-09 16:29:43 +09:00
aycabta
d626ca1e98
Remove obsolete TODO comment
2019-08-06 20:03:23 +09:00
aycabta
81a15d636e
Update Unicode URL to 12.1.0
2019-08-06 20:03:23 +09:00
Nobuyoshi Nakada
b40589802b
[reline] Do not compile regexp for each line
2019-07-28 09:52:19 +09:00
Nobuyoshi Nakada
a6e32855d0
[reline] Do not escape and compile regexp for each byte
2019-07-28 09:47:40 +09:00
aycabta
0f9ec4a877
Check wether multibyte character is split
2019-07-25 17:19:16 +09:00
aycabta
c8ee44f44c
Fix showing doc of "nil.to_s", nil doesn't have #name
2019-07-19 08:23:41 +09:00
aycabta
cd7b99bbfc
Version 0.0.1
2019-07-15 00:36:59 +09:00
manga_osyo
04e6b90d5b
Remove unused method.
2019-07-15 00:33:16 +09:00
manga_osyo
073cc52dcc
Add `class Reline::History` and test.
2019-07-15 00:17:59 +09:00
Luke Gruber
3163a07878
fix issue with 'SIGINT' handling in LineEditor#reset
...
@old_trap is the string "DEFAULT" and not a callable object (Proc)
if there are no other signal handlers for SIGINT signal to chain.
2019-07-14 15:51:09 +09:00
Nobuyoshi Nakada
688cef2169
Refactored width calculations
2019-07-06 12:31:11 +09:00
Nobuyoshi Nakada
44aae5fee6
Simplified
2019-07-06 12:11:12 +09:00
aycabta
6c2b59f923
Support Control- and Meta-
2019-07-04 20:58:11 +09:00
aycabta
d9f8b88b47
Move a comment to proper place
2019-07-04 19:34:08 +09:00
Nobuyoshi Nakada
265b9a0edf
Parse key sequence more strictly
2019-07-04 18:54:50 +09:00
Nobuyoshi Nakada
12e06d32f5
Use lstrip instead of gsub which can match only once
2019-07-04 18:49:42 +09:00
Nobuyoshi Nakada
ee861e43f7
Skip indented comment lines [Bug #15981 ]
2019-07-04 18:47:22 +09:00
Nobuyoshi Nakada
90c51ca391
New indent must be non-negative number
2019-07-01 20:46:00 +09:00
aycabta
72bfc52de6
Decrease indent by closing token correctly
2019-06-27 01:21:06 +09:00
aycabta
c4c47b792d
Disable auto indent when move cursor up or down
...
This commit suppresses a strange behavior below:
if true
1[cursor]
end
and press down key
if true
1
end
2019-06-20 16:00:30 +09:00
aycabta
235e72f17e
Implement auto indent for multiline
2019-06-18 20:58:18 +09:00
aycabta
2fb1564c02
Implement line_no correctly
2019-06-16 14:46:28 +09:00
aycabta
d0e5564140
Set allow_escape_code for prompt
2019-06-14 08:45:35 +09:00
aycabta
64310b2573
Add Reline.prompt_proc
2019-06-14 07:42:53 +09:00
aycabta
02880d1f4a
Skip transpose-words if less than 2 word
2019-06-06 04:57:52 +09:00
aycabta
c75a3356b3
Move I/O access from Reline::KeyStroke to Reline
2019-06-05 11:29:59 +09:00
aycabta
9a07915ae2
Add aliases for commands for changing text macro
2019-06-04 08:35:01 +09:00
aycabta
4b7213a85a
Implement transpose-words
2019-06-04 07:23:36 +09:00
Nobuyoshi Nakada
fc7b4c7018
Simplify matching
2019-06-04 00:33:56 +09:00
aycabta
d7c3eb570b
Erase VI_OPERATORS
...
The operators are using @waiting_operator_proc in vi mode.
2019-06-03 17:24:49 +09:00
aycabta
182072b211
The C-q is also quoted insert in emacs mode
2019-06-03 04:17:52 +09:00
aycabta
5524de5ca0
Add aliases for commands for moving macro
2019-06-03 03:41:40 +09:00
aycabta
3428922437
The ed_move_to_beg is different from vi_first_print
2019-06-03 03:29:34 +09:00
Nobuyoshi Nakada
65fdb90325
Reline::LineEditor::ARGUMENTABLE is no longer used
2019-06-03 02:03:15 +09:00
Nobuyoshi Nakada
3457ce4486
Fix ArgumentError in aliased macro
...
Closes: https://github.com/ruby/ruby/pull/2221
2019-06-03 01:35:48 +09:00
Nobuyoshi Nakada
f4b060d8d7
Check conditional nestings in INPUTRC
...
Closes: https://github.com/ruby/ruby/pull/2222
2019-06-02 22:58:05 +09:00
Nobuyoshi Nakada
a1e6e45341
Prefer $INPUTRC over the default in the home
...
Closes: https://github.com/ruby/ruby/pull/2222
2019-06-02 22:58:05 +09:00
Nobuyoshi Nakada
d04ebc57f2
Add true condition `Reline`
2019-06-02 20:31:25 +09:00
aycabta
486a2c26d6
Add Reline test for unknown macro
2019-06-02 08:50:01 +09:00
aycabta
e360688c4d
Add new test for Reline within pipe
2019-06-02 07:39:12 +09:00
aycabta
28e01f006d
Add comments to key bindings vars of Reline::Config
2019-06-02 07:28:26 +09:00
aycabta
7b1c1b9492
Suppress error of macro not found
2019-06-02 05:07:13 +09:00
aycabta
34727475d0
Remove an unnecessary argument
2019-06-01 15:07:52 +09:00
Nobuyoshi Nakada
3034d666e8
Just use `File.readlines`
2019-06-01 14:57:36 +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
Takashi Kokubun
cb40a21da0
Warn compile_error only when input is finished
...
Let's say we are in progress to write `"foo"`:
```
irb> "fo
```
at this moment, nothing is wrong.
It would be just a normal way to write `"foo"`.
Prior to this commit, the `fo` part was warned because of
5b64d7ac6e
. But I think warning such a
normal input is not valuable for users.
However, we'd like to warn `:@1` or `@@1` which is also a syntax error.
Then this commit switches the syntax highlight based on whether the
input text is finished or not. When it's not finished yet, it does not
warn compile_error.
2019-05-31 06:54:00 +09:00
aycabta
8f83fe3b02
Finish with ^D only when input is completely empty in vi insert mode
2019-05-31 05:53:02 +09:00
aycabta
279c8e14d4
Use rebuilt buffer data to rerender all
2019-05-30 20:54:28 +09:00
aycabta
74a0e3ec23
Use start_with? for escaped quote too
2019-05-30 20:06:59 +09:00
aycabta
ecd0f1d966
Use negative lookahead and start_with?
2019-05-30 18:29:26 +09:00
aycabta
fcca39fa73
Fix strange vertical cursor moving when adding a newline at bottom
2019-05-30 18:21:09 +09:00
aycabta
5a229b0a88
Calculate vertical position correctly when rerendering all lines
2019-05-30 15:19:30 +09:00
aycabta
90014dddec
Fix broken rendering when the last line is auto-wrapped
2019-05-30 15:04:37 +09:00
aycabta
eae953ba9f
Rerender following lines when line number increased
2019-05-30 14:19:58 +09:00
aycabta
1cf9f79342
Clear remaining lines when line number decreased
2019-05-30 14:04:28 +09:00
aycabta
cb520e7623
Fix the auto-wrap behabior that was too buggy
2019-05-30 12:29:38 +09:00
aycabta
fafcbe0eb0
Use reversed get_screen_size correctly on Windows
2019-05-29 18:52:34 +09:00
aycabta
ccfb12d76c
Fix condition..."and" is lowest priority operator, than "="
2019-05-28 11:03:02 +09:00
aycabta
57b4df07bc
Use Reline.completer_quote_characters to complete
2019-05-28 08:38:55 +09:00
aycabta
74c88e7cda
Fix reversed row and column get_screen_size on Windows
2019-05-28 05:10:49 +09:00
aycabta
f6b62d8fe7
Use Shift+Enter as Meta+Enter on Windows
2019-05-28 04:39:29 +09:00
aycabta
8b135cc875
Use VK_MENU instead of VK_LMENU to check ALT on Windows
2019-05-28 04:25:50 +09:00
aycabta
7447c7b651
Join next line if deletes newline at end of line
2019-05-28 01:52:04 +09:00
aycabta
69c7ad1723
Exit only when blank input
2019-05-28 01:51:01 +09:00
aycabta
9a68aba79f
Support OSC and treat \1 \2 correctly
2019-05-28 00:48:02 +09:00
aycabta
70166b3ca3
Revert "Support OSC and treat \1 \2 correctly"
...
This reverts commit 77bfebebc4
.
2019-05-28 00:21:24 +09:00