rcurses 5.1.6 → 6.0.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/pane.rb +10 -3
- data/lib/rcurses.rb +4 -3
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53036cc4649face7e14b08f311890f1ccd0e09acd6f65f15a797578b4184d7ac
|
4
|
+
data.tar.gz: eef69f7e651ef3d62bd7f68d42a92d166267ef67fcef5a6e20753ecd1a95acb9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a28c4b75f14b35c4fc92d2c26d7fc214db22944c59d185d44c89f32ecc8078593d5a84d9082b96d968e1b4156341fd8790ce95f2c3b478ecd8b8318054047763
|
7
|
+
data.tar.gz: 31df11786aa48deda46a57917f2ce586f93ff6db27e7ee118fd52fbe42c5c57c69f5c8cb69852163fd0991fcd060c0728dc7e810980db8d51272e2d650aa5383
|
data/lib/rcurses/pane.rb
CHANGED
@@ -223,10 +223,17 @@ module Rcurses
|
|
223
223
|
|
224
224
|
content_rows = @h
|
225
225
|
# Ensure we have processed enough lines for the current scroll position + visible area.
|
226
|
-
|
227
|
-
|
226
|
+
# Dynamically process more lines as needed when scrolling through large lists
|
227
|
+
required_lines = @ix + content_rows + 100 # Larger buffer for smoother scrolling
|
228
228
|
|
229
|
-
|
229
|
+
# Safety limit to prevent excessive memory usage (but still very generous)
|
230
|
+
max_allowed = 100000 # Allow up to 100k lines which should handle any reasonable directory
|
231
|
+
|
232
|
+
# Process lines on demand as we scroll
|
233
|
+
while @lazy_txt.size < required_lines && @lazy_index < @raw_txt.size
|
234
|
+
# Safety check to prevent runaway memory usage
|
235
|
+
break if @lazy_txt.size > max_allowed
|
236
|
+
|
230
237
|
raw_line = @raw_txt[@lazy_index]
|
231
238
|
# If the raw line is short, no wrapping is needed.
|
232
239
|
if raw_line.respond_to?(:pure) && Rcurses.display_width(raw_line.pure) < @w
|
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:
|
8
|
+
# Version: 6.0.0: Breaking change - no auto-init, apps must call Rcurses.init!
|
9
9
|
|
10
10
|
require 'io/console' # Basic gem for rcurses
|
11
11
|
require 'io/wait' # stdin handling
|
@@ -163,8 +163,9 @@ module Rcurses
|
|
163
163
|
end
|
164
164
|
end
|
165
165
|
|
166
|
-
#
|
167
|
-
init!
|
166
|
+
# BREAKING CHANGE in 6.0.0: No more auto-initialization
|
167
|
+
# All apps must now explicitly call Rcurses.init! when ready to use rcurses
|
168
|
+
# This ensures compatibility with Ruby 3.4+ and gives apps better control
|
168
169
|
end
|
169
170
|
|
170
171
|
# vim: set sw=2 sts=2 et filetype=ruby fdn=2 fcs=fold\:\ :
|
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: 6.0.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-08-
|
11
|
+
date: 2025-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clipboard
|
@@ -29,9 +29,9 @@ 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.
|
33
|
-
|
34
|
-
|
32
|
+
in panes. Cursor movement around the terminal. VERSION 6.0.0 BREAKING CHANGE: Apps
|
33
|
+
must now explicitly call Rcurses.init! - auto-initialization has been removed for
|
34
|
+
Ruby 3.4+ compatibility.'
|
35
35
|
email: g@isene.com
|
36
36
|
executables: []
|
37
37
|
extensions: []
|