Nobuyoshi Nakada
a48dc89547
[ruby/reline] Check the result of GetConsoleScreenBufferInfo
...
42edf7b3aa
2021-10-12 13:19:25 +09:00
Nobuyoshi Nakada
1009fd7ee3
[ruby/reline] Revert "Fix zero division when the screen width is not available"
...
This reverts commit 0dce9da083541f42c31822a91c72f339934c3986.
f71471cdde
2021-10-12 13:19:24 +09:00
Nobuyoshi Nakada
60689f0f20
[ruby/reline] Fix zero division when the screen width is not available
...
0dce9da083
2021-10-12 00:40:22 +09:00
aycabta
e212d051d0
[ruby/reline] Rescue LoadError to require 'fiddle'
...
fe504bb6b9
2021-10-11 21:34:31 +09:00
aycabta
89556a6555
[ruby/reline] Remove a comment for debug
...
5f3ccda3d5
2021-10-11 21:17:02 +09:00
aycabta
56140bc7af
[ruby/reline] Version 0.2.8.pre.11
...
de858ee1ac
2021-10-09 23:27:40 +09:00
aycabta
9cb7ba2f21
[ruby/reline] Add RELINE_ALT_SCROLLBAR env to use alternative text for scrollbar
...
The setting to use '::' instead of block elements.
4afbc98e2c
2021-10-09 23:23:02 +09:00
aycabta
e6ba2953e9
[ruby/reline] Fix calculating dialog width with full-width scrollbar
...
93bc9b5277
2021-10-09 23:22:57 +09:00
aycabta
ded5a66cb9
[ruby/reline] Use alternate text for scrollbar in non-UTF-8 env
...
69e365edcc
2021-10-08 18:48:44 +09:00
Jeremy Evans
55d7f63bde
[ruby/reline] Better fix for non-UTF-8 default external encoding
...
Previous fix didn't show the cursor or dialogs. This allows the
dialogs to continue to work.
651c5f63cc
2021-10-08 10:38:47 +09:00
Jeremy Evans
eb4682b3c6
[ruby/reline] Only show dialogs if default external encoding is UTF-8
...
Fixes a crash in IRB if a dialog is displayed and the default
external encoding is not UTF-8:
/home/jeremy/tmp/reline/lib/reline/line_editor.rb:731:in `write': U+2588 from UTF-8 to US-ASCII (Encoding::UndefinedConversionError)
f570525ecd
2021-10-08 10:38:43 +09:00
aycabta
374b15a84a
[ruby/reline] Cut off the excess on narrow screen
...
972cc993ca
2021-10-08 10:33:22 +09:00
aycabta
a2f55679f0
[ruby/reline] Rename DIALOG_HEIGHT with DIALOG_DEFAULT_HEIGHT
...
996bfec64b
2021-10-08 10:33:17 +09:00
aycabta
f625645a37
[ruby/reline] The width of block elements is 1 on Windows
...
5f4a75c7a0
2021-10-05 22:33:07 +09:00
aycabta
6966c3ff44
[ruby/reline] Change struct size correctly
...
df2a1b4e08
2021-10-05 22:32:56 +09:00
aycabta
1e9714cf34
[ruby/reline] Use default background color to erase on Windows
...
852e855d82
2021-10-04 00:14:10 +09:00
aycabta
64e96d6b41
[ruby/reline] Re-calc the scroll pos when the content in dialog is shortened
...
12ea63e6e0
2021-10-03 21:51:02 +09:00
aycabta
7f02cc50dd
[ruby/reline] Version 0.2.8.pre.10
...
1c6c0c82f0
2021-10-03 21:48:12 +09:00
aycabta
6cb37d4136
[ruby/reline] Initialize @trap_key to suppress warning
...
b42c0980d9
2021-10-03 21:38:05 +09:00
aycabta
bf4f3ef5ad
[ruby/reline] Add a comment to use "private alias_method" idiom after drop Ruby 2.5
...
1b00cae0fd
2021-10-03 18:41:29 +09:00
aycabta
b91b3000bd
[ruby/reline] Add code block notation in doc
...
b283791dc5
2021-10-03 15:31:47 +09:00
aycabta
bc5407f00c
[ruby/reline] Add doc for ed-unassigned and ed-insert macro
...
7fe9ecf945
2021-10-03 15:25:50 +09:00
aycabta
95522ef8b9
[ruby/reline] Rerender whole buffer when argument editing finished
...
If the argument prompt disappears when pasting is finished, rerender the
whole buffer.
996bbf8797
2021-10-03 14:53:13 +09:00
aycabta
bf0a8a7462
[ruby/reline] Call LineEditor#resize on Windows
...
65b27dd2ff
2021-10-03 14:27:33 +09:00
TOMITA Masahiro
ef350b3a56
[ruby/reline] Simplify SIGWINCH handler to avoid aborting when resizing.
...
481add0537
2021-10-03 14:26:53 +09:00
aycabta
4401bbe8a7
[ruby/reline] Use String#unpack1
...
179c52bca8
2021-10-03 14:08:55 +09:00
aycabta
a2d2f00e4a
[ruby/reline] Adjust border of scrollbar rendering calculation
...
737b23beae
2021-10-03 14:08:49 +09:00
aycabta
1d2edda9f8
[ruby/reline] The @block_elem_width shouldn't be used for height calculation
...
da35902d78
2021-10-03 14:08:45 +09:00
aycabta
5eb8b6d1bd
[ruby/reline] Support ed_argument_digit by M+num
...
The vi mode can handle "argument number" before an operator or a motion,
such as, "3x" (equals "xxx"), and "3l" (equals "lll"). In the emacs
mode, GNU Readline can handle argument number with meta key, like
"Meta+3 x" (equals "xxx").
9183cc2e8b
2021-09-29 22:07:49 +09:00
aycabta
c4acde8959
[ruby/reline] Ignore NUL by ed_quoted_insert
...
43b7c01a98
2021-09-28 14:15:49 +09:00
aycabta
a230ff0f83
[ruby/reline] ^K is kill-line and ^U is unix-line-discard for inputrc
...
5936071940
2021-09-27 01:16:15 +09:00
Jake Zimmerman
3f7b08d2cb
[ruby/reline] Implement vi_kill_line_prev
...
This operation is mentioned and bound to `^U` in both `vi_command.rb`
and `vi_insert.rb`, but there is no definition of it.
Both Vi and Emacs use the same keystroke to do the same behavior, so
I've chosen to use `alias_method` to make the implementation small,
rather than duplicating the method and re-implementing it.
fdbfc8669f
2021-09-26 23:47:11 +09:00
aycabta
f726c79d74
[ruby/reline] Add aliases {prev,next}_history to ed_{prev,next}_history
...
d740e18cff
2021-09-25 00:11:44 +09:00
aycabta
63aba76893
[ruby/reline] Use SGR 0 instead of SGR 39 and 49 to reset font settings
...
cbacb4c1cf
2021-09-24 03:08:33 +09:00
aycabta
3b5923bca3
[ruby/reline] Reset all font settings at left end of dialog
...
5f293b5127
2021-09-23 23:41:55 +09:00
Kazuhiro NISHIYAMA
357406da8b
[ruby/reline] Use unpack1
instead of unpack(template)[0]
...
45aa367616
2021-09-22 23:37:59 +09:00
ima1zumi
616d671758
[ruby/reline] Remove unused using method
...
follow #347
37453a83a3
2021-09-14 22:28:50 +09:00
aycabta
8de53fb31c
[ruby/reline] Use expanded method definitions instead of refinements
...
@jhawthorn said, "this will make Ruby's integer comparisons slower
globally." It looks like "binding.irb" is going to cause serious
problems in Rails applications.
ee8d6c6a82
2021-09-13 05:15:47 +09:00
aycabta
5dc753df47
[ruby/reline] Move #pointer from DialogRenderInfo to Dialog
...
92dbac0bff
2021-09-10 11:38:54 +09:00
aycabta
fbfa0c880d
[ruby/reline] Version 0.2.8.pre.9
...
bad76b5a87
2021-09-10 10:59:40 +09:00
aycabta
5af602e4d4
[ruby/reline] Erase lines correctly when dialog height is changed
...
68d2516551
2021-09-10 09:05:25 +09:00
aycabta
e4eb085329
[ruby/reline] Render scrollbar when the column of the dialog is moved
...
5cea268e56
2021-09-08 03:34:51 +09:00
aycabta
8b6d757ba0
[ruby/reline] Remove variables that have no meaning in calculations
...
3b7a1900fd
2021-09-08 03:34:46 +09:00
aycabta
11a00e3fa2
[ruby/reline] Remove garbage left behind when rerendering the right side of the dialog
...
d89c23e30b
2021-09-08 03:34:40 +09:00
aycabta
95089ddaf4
[ruby/reline] Move only one line when render a line and then go to the next line
...
8a966cd962
2021-09-08 01:11:13 +09:00
aycabta
6faf653ab0
[ruby/reline] The #reset_dialog should also use calculated block elem width
...
577df401b9
2021-09-08 00:13:21 +09:00
aycabta
5a01da7a29
[ruby/reline] Remove debug print
...
6f82177f2e
2021-09-08 00:08:48 +09:00
aycabta
b766214851
[ruby/reline] Calculate block elem width only once
...
3054a67d05
2021-09-08 00:08:43 +09:00
aycabta
0ef3d574a0
[ruby/reline] Ensure that scrollbar is only rerendered when the position is changed
...
f629853eae
2021-09-08 00:08:38 +09:00
aycabta
30486d9150
[ruby/reline] The width of Block Elements in Unicode is East Asian Ambiguous
...
05e8ab8cbb
2021-09-08 00:04:40 +09:00