rcurses 6.2.3 → 6.2.5
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/pane.rb +9 -3
- data/lib/rcurses.rb +8 -1
- 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: 4ed97ba200bc51c5599c78550f12429ffe8887c01b25a59b509a015b84be7a72
|
|
4
|
+
data.tar.gz: bfac1a426621f248c11adaca91916cdeed07caf2ed1e8a55319b4fff70ef6b32
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2eb5ed84c91747596cd97c0563140502339ef2d92d65de3652e475d5d6b525affa993d6a98ec0a6f07b79db4c935a1d90ad99e401ecf9c8ffc12c065b4c1a8fb
|
|
7
|
+
data.tar.gz: de0fba662080514b3cb3db0750a5cd3cfe72b71ef5ec20aa4f303902823f62dd2d370154b16854d4fadaef41f5bcd7e97e5d3e2f71e4eece757f0f3765a3d119
|
data/lib/rcurses/pane.rb
CHANGED
|
@@ -344,6 +344,12 @@ module Rcurses
|
|
|
344
344
|
line_str = @skip_colors ? " " * @w : " ".c(fmt) * @w
|
|
345
345
|
end
|
|
346
346
|
|
|
347
|
+
# Hard-clip line to pane width to prevent overflow into adjacent panes
|
|
348
|
+
visible_w = Rcurses.display_width(line_str.respond_to?(:pure) ? line_str.pure : line_str.gsub(/\e\[[0-9;]*m/, ''))
|
|
349
|
+
if visible_w > @w
|
|
350
|
+
line_str = line_str.respond_to?(:shorten) ? line_str.shorten(@w) : line_str[0, @w]
|
|
351
|
+
end
|
|
352
|
+
|
|
347
353
|
new_frame << line_str
|
|
348
354
|
end
|
|
349
355
|
|
|
@@ -356,13 +362,13 @@ module Rcurses
|
|
|
356
362
|
end
|
|
357
363
|
end
|
|
358
364
|
|
|
359
|
-
# Restore cursor,
|
|
360
|
-
diff_buf << "\e8\e[
|
|
365
|
+
# Restore cursor, reset SGR and scroll-region (keep auto-wrap disabled)
|
|
366
|
+
diff_buf << "\e8\e[0m\e[r"
|
|
361
367
|
begin
|
|
362
368
|
print diff_buf
|
|
363
369
|
rescue => e
|
|
364
370
|
begin
|
|
365
|
-
print "\e[0m\e[?25h
|
|
371
|
+
print "\e[0m\e[?25h"
|
|
366
372
|
rescue
|
|
367
373
|
end
|
|
368
374
|
end
|
data/lib/rcurses.rb
CHANGED
|
@@ -69,6 +69,10 @@ module Rcurses
|
|
|
69
69
|
trap(sig) { cleanup!; exit }
|
|
70
70
|
end
|
|
71
71
|
|
|
72
|
+
# Switch to alternate screen buffer (like vim, mutt, less, htop).
|
|
73
|
+
# This isolates the TUI from stray output by other processes.
|
|
74
|
+
print "\e[?1049h"
|
|
75
|
+
|
|
72
76
|
# Flush any pending stdin data (terminal position responses, etc.)
|
|
73
77
|
# This prevents cursor query responses from blocking the first getchr
|
|
74
78
|
$stdin.getc while $stdin.wait_readable(0)
|
|
@@ -107,6 +111,9 @@ module Rcurses
|
|
|
107
111
|
system("stty sane 2>/dev/null")
|
|
108
112
|
end
|
|
109
113
|
|
|
114
|
+
# Restore main screen buffer (leave alternate screen)
|
|
115
|
+
print "\e[?1049l"
|
|
116
|
+
|
|
110
117
|
# Only clear screen if there's no error to display
|
|
111
118
|
# This preserves the error context on screen
|
|
112
119
|
if @error_to_display.nil?
|
|
@@ -116,7 +123,7 @@ module Rcurses
|
|
|
116
123
|
print "\e[999;1H" # Move to bottom-left
|
|
117
124
|
print "\e[K" # Clear current line
|
|
118
125
|
end
|
|
119
|
-
|
|
126
|
+
|
|
120
127
|
Cursor.show
|
|
121
128
|
|
|
122
129
|
@cleaned_up = true
|
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: 6.2.
|
|
4
|
+
version: 6.2.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Geir Isene
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-03-
|
|
11
|
+
date: 2026-03-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: clipboard
|