rcurses 3.6 → 3.6.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/rcurses/input.rb +9 -0
- data/lib/rcurses.rb +1 -1
- data/lib/string_extensions.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 990c6a5c91e3bef56cccf8187eff311de175ea9768ebaeacfddee120da475fd1
|
4
|
+
data.tar.gz: 921b19ca7659cdf24d49adeee9922afd72ef31e567d0e17bd891ce99e2cf0815
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7fe98e795dbde85b2e5c245065d250c62d1f44f99de113f5177f402ed05cdfe1107394c3dde78d29ae6ae18f2b1fa8126cce791d4277421f0be8ef0dd0b97eba
|
7
|
+
data.tar.gz: 8505d54426d358c8820b8a07683dd824d6b5604c218a0ccbc9322b2508840c1583d87924200ebf11dfc8261d91b9a4385a61212d961812bfebf081cb86936b67
|
data/lib/rcurses/input.rb
CHANGED
@@ -154,6 +154,15 @@ module Rcurses
|
|
154
154
|
else chr = ""
|
155
155
|
end
|
156
156
|
|
157
|
+
# Flush any extra input characters from STDIN
|
158
|
+
while IO.select([$stdin], nil, nil, 0)
|
159
|
+
begin
|
160
|
+
$stdin.read_nonblock(1024)
|
161
|
+
rescue IO::WaitReadable, EOFError
|
162
|
+
break
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
157
166
|
chr
|
158
167
|
end
|
159
168
|
end
|
data/lib/rcurses.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
# Web_site: http://isene.com/
|
6
6
|
# Github: https://github.com/isene/rcurses
|
7
7
|
# License: Public domain
|
8
|
-
# Version: 3.6:
|
8
|
+
# Version: 3.6.2: Flush any residue of characters before returning chr
|
9
9
|
|
10
10
|
require 'io/console' # Basic gem for rcurses
|
11
11
|
require 'io/wait' # stdin handling
|
data/lib/string_extensions.rb
CHANGED
@@ -36,7 +36,7 @@ class String
|
|
36
36
|
|
37
37
|
def clean_ansi
|
38
38
|
# Remove a leading and trailing reset code if present, fixing extra \e[0m introduced by some commands
|
39
|
-
self.gsub(/\A\e\[0m/, '').gsub(/\e\[0m\z/, '')
|
39
|
+
self.gsub(/\e\[0m(?=\e\[38;5)/, '').gsub(/\A\e\[0m/, '').gsub(/\e\[0m\z/, '')
|
40
40
|
end
|
41
41
|
|
42
42
|
def pure
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rcurses
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geir Isene
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-04-
|
11
|
+
date: 2025-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clipboard
|
@@ -29,7 +29,8 @@ description: 'Create curses applications for the terminal easier than ever. Crea
|
|
29
29
|
up text (in panes or anywhere in the terminal) in bold, italic, underline, reverse
|
30
30
|
color, blink and in any 256 terminal colors for foreground and background. Use a
|
31
31
|
simple editor to let users edit text in panes. Left, right or center align text
|
32
|
-
in panes. Cursor movement around the terminal. New in 3.6:
|
32
|
+
in panes. Cursor movement around the terminal. New in 3.6.2: Flush any residue of
|
33
|
+
characters before returning chr.'
|
33
34
|
email: g@isene.com
|
34
35
|
executables: []
|
35
36
|
extensions: []
|