rcurses 3.7 → 3.7.1
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 +1 -1
- data/lib/rcurses.rb +2 -2
- data/lib/string_extensions.rb +8 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44240d40ec0eed615d785bf0cbd288470b722a1162a6d2e30a1f1045dfed3a01
|
4
|
+
data.tar.gz: 0316a667c756e3f99b6fe6d0ee1d0956f673058139cbbbb615d48882b0b799b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a54a18fb906abebebbf5a7066a4448ba25c47a80df7fced9289c86d17caf09d62b2bbb959863470fb2243ead27de62d9278a3843e9c075a16a6885120250f5f
|
7
|
+
data.tar.gz: 0dd21b911092c501c146ad354ca5dfd58cb84bdff142237ed2b9be677b5f5a18ee8c40283194794affc493097fb9d8a9cc37120a08a787eaa14718920630722a
|
data/lib/rcurses/input.rb
CHANGED
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.7:
|
8
|
+
# Version: 3.7.1: Fixed straggling residue key codes and improved clean_ansi
|
9
9
|
|
10
10
|
require 'io/console' # Basic gem for rcurses
|
11
11
|
require 'io/wait' # stdin handling
|
@@ -17,4 +17,4 @@ require_relative 'rcurses/cursor'
|
|
17
17
|
require_relative 'rcurses/input'
|
18
18
|
require_relative 'rcurses/pane'
|
19
19
|
|
20
|
-
# vim: set sw=2 sts=2 et filetype=ruby
|
20
|
+
# vim: set sw=2 sts=2 et filetype=ruby fdn=2 fcs=fold\:\ :
|
data/lib/string_extensions.rb
CHANGED
@@ -35,8 +35,14 @@ class String
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def clean_ansi
|
38
|
-
|
39
|
-
|
38
|
+
dup
|
39
|
+
# 1) kill any “\e[0m” that follows another ANSI‐code (so “\e[7m\e[0mtest” → “\e[7mtest”)
|
40
|
+
.gsub(/\e\[[\d;]+m\e\[0m/, '\0'.sub("\e[0m", ''))
|
41
|
+
# 2) kill any “\e[0m” that immediately precedes non‐ESC output (so stray resets just before text)
|
42
|
+
.gsub(/\e\[0m(?=[^\e])/, '')
|
43
|
+
# 3) kill leading or trailing reset codes
|
44
|
+
.gsub(/\A\e\[0m/, '')
|
45
|
+
.gsub(/\e\[0m\z/, '')
|
40
46
|
end
|
41
47
|
|
42
48
|
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.7.1
|
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-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clipboard
|
@@ -29,8 +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.7:
|
33
|
-
|
32
|
+
in panes. Cursor movement around the terminal. New in 3.7.1: Fixed straggling residue
|
33
|
+
key codes and improved clean_ansi.'
|
34
34
|
email: g@isene.com
|
35
35
|
executables: []
|
36
36
|
extensions: []
|