reline 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/reline/line_editor.rb +8 -15
- data/lib/reline/version.rb +1 -1
- data/lib/reline/windows.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5864c77904d813f20ffdb6963ba8e2297e84c3e71b9c94c2a55528ccf73b47da
|
4
|
+
data.tar.gz: c0bf68a1988228c3ad046e3e6658b79d22b59a98792d2c9666ecf92d9bf74a2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ef8bf25d8412ee409a2d5bf13568d50befb5c8a8bbd64b7f82c8649807a42e8c822950d8f76c520ff464ddc91e9c80f1ade09f902f671b5a678631b606ebfd6
|
7
|
+
data.tar.gz: 32a2f60967b403860f8efbe92163e0f564e3cff553b700db6a9ddaf8b8a44dd8f30c64db66ff793a95cd7ad2ab8348dd3548d9f2e2ed88ca3f50861d529faec4
|
data/lib/reline/line_editor.rb
CHANGED
@@ -377,6 +377,7 @@ class Reline::LineEditor
|
|
377
377
|
end
|
378
378
|
new_highest_in_this = calculate_height_by_width(prompt_width + calculate_width(@line.nil? ? '' : @line))
|
379
379
|
# FIXME: end of logical line sometimes breaks
|
380
|
+
rendered = false
|
380
381
|
if @add_newline_to_end_of_buffer
|
381
382
|
rerender_added_newline
|
382
383
|
@add_newline_to_end_of_buffer = false
|
@@ -675,17 +676,13 @@ class Reline::LineEditor
|
|
675
676
|
Reline::IOGate.move_cursor_column(0)
|
676
677
|
if line.nil?
|
677
678
|
if calculate_width(visual_lines[index - 1], true) == Reline::IOGate.get_screen_size.last
|
678
|
-
#
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
# cursor position.
|
686
|
-
move_cursor_down(1)
|
687
|
-
Reline::IOGate.move_cursor_column(0)
|
688
|
-
end
|
679
|
+
# Reaches the end of line.
|
680
|
+
#
|
681
|
+
# When the cursor is at the end of the line and erases characters
|
682
|
+
# after the cursor, some terminals delete the character at the
|
683
|
+
# cursor position.
|
684
|
+
move_cursor_down(1)
|
685
|
+
Reline::IOGate.move_cursor_column(0)
|
689
686
|
else
|
690
687
|
Reline::IOGate.erase_after_cursor
|
691
688
|
move_cursor_down(1)
|
@@ -694,10 +691,6 @@ class Reline::LineEditor
|
|
694
691
|
next
|
695
692
|
end
|
696
693
|
@output.write line
|
697
|
-
if Reline::IOGate.win? and calculate_width(line, true) == Reline::IOGate.get_screen_size.last
|
698
|
-
# A newline is automatically inserted if a character is rendered at eol on command prompt.
|
699
|
-
@rest_height -= 1 if @rest_height > 0
|
700
|
-
end
|
701
694
|
@output.flush
|
702
695
|
if @first_prompt
|
703
696
|
@first_prompt = false
|
data/lib/reline/version.rb
CHANGED
data/lib/reline/windows.rb
CHANGED
@@ -258,6 +258,7 @@ class Reline::Windows
|
|
258
258
|
cursor = csbi[4, 4].unpack('L').first
|
259
259
|
written = 0.chr * 4
|
260
260
|
@@FillConsoleOutputCharacter.call(@@hConsoleHandle, 0x20, get_screen_size.last - cursor_pos.x, cursor, written)
|
261
|
+
@@FillConsoleOutputAttribute.call(@@hConsoleHandle, 0, get_screen_size.last - cursor_pos.x, cursor, written)
|
261
262
|
end
|
262
263
|
|
263
264
|
def self.scroll_down(val)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- aycabta
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: io-console
|