rcurses 3.7.4 → 3.8.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 -18
- data/lib/rcurses.rb +1 -1
- 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: ce853c344b8eb5bf0f3cf398344fd038a54052687036dacd3ffe9030eb9d0ed2
|
4
|
+
data.tar.gz: bd6899c2572a9d663bb02436061733f369cb8857d19bce499d737dae2f683785
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9d6db33bd763b7f2f6db4098babede2d6500b3a3d10d467849457791e2ed8a5975eacbfd7c5376fda1b1592401024ddb2f952631a82c45dc5b101a0b89bb583
|
7
|
+
data.tar.gz: 0e4ce716e6398e86c213105932345215e684ec4b7e02b9a3332e513c73a5cf4f5664fd1cc11b706e550ce398745be49191a2faeb3cbfe394d819cc442dd631f1
|
data/lib/rcurses/pane.rb
CHANGED
@@ -181,10 +181,6 @@ module Rcurses
|
|
181
181
|
@ix = 0 if @ix < 0
|
182
182
|
|
183
183
|
new_frame = []
|
184
|
-
if @border
|
185
|
-
top_border = ("┌" + "─" * @w + "┐").c(fmt)
|
186
|
-
new_frame << top_border
|
187
|
-
end
|
188
184
|
|
189
185
|
content_rows.times do |i|
|
190
186
|
line_str = ""
|
@@ -205,24 +201,14 @@ module Rcurses
|
|
205
201
|
line_str = " ".c(fmt) * @w
|
206
202
|
end
|
207
203
|
|
208
|
-
if @border
|
209
|
-
line_str = "│" + line_str + "│"
|
210
|
-
end
|
211
|
-
|
212
204
|
new_frame << line_str
|
213
205
|
end
|
214
206
|
|
215
|
-
if @border
|
216
|
-
bottom_border = ("└" + "─" * @w + "┘").c(fmt)
|
217
|
-
new_frame << bottom_border
|
218
|
-
end
|
219
|
-
|
220
207
|
diff_buf = ""
|
221
208
|
new_frame.each_with_index do |line, i|
|
222
|
-
row_num = @
|
223
|
-
col_num = @
|
224
|
-
if @prev_frame.nil? || @prev_frame[i] != line
|
225
|
-
(@border && (i == 0 || i == new_frame.size - 1))
|
209
|
+
row_num = @y + i
|
210
|
+
col_num = @x
|
211
|
+
if @prev_frame.nil? || @prev_frame[i] != line
|
226
212
|
diff_buf << "\e[#{row_num};#{col_num}H" << line
|
227
213
|
end
|
228
214
|
end
|
@@ -234,7 +220,7 @@ module Rcurses
|
|
234
220
|
|
235
221
|
# Draw scroll markers after printing the frame.
|
236
222
|
if @scroll
|
237
|
-
marker_col = @
|
223
|
+
marker_col = @x + @w - 1
|
238
224
|
if @ix > 0
|
239
225
|
print "\e[#{@y};#{marker_col}H" + "∆".c(fmt)
|
240
226
|
end
|
@@ -246,9 +232,15 @@ module Rcurses
|
|
246
232
|
end
|
247
233
|
|
248
234
|
if @border
|
235
|
+
# top
|
236
|
+
print "\e[#{@y - 1};#{@x - 1}H" + ("┌" + "─" * @w + "┐").c(fmt)
|
237
|
+
# sides
|
249
238
|
(0...@h).each do |i|
|
239
|
+
print "\e[#{@y + i};#{@x - 1}H" + "│".c(fmt)
|
250
240
|
print "\e[#{@y + i};#{@x + @w}H" + "│".c(fmt)
|
251
241
|
end
|
242
|
+
# bottom
|
243
|
+
print "\e[#{@y + @h};#{@x - 1}H" + ("└" + "─" * @w + "┘").c(fmt)
|
252
244
|
end
|
253
245
|
|
254
246
|
new_frame.join("\n")
|
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.
|
8
|
+
# Version: 3.8.1: Code clean-up
|
9
9
|
|
10
10
|
require 'io/console' # Basic gem for rcurses
|
11
11
|
require 'io/wait' # stdin handling
|
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: 3.
|
4
|
+
version: 3.8.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-27 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.
|
33
|
-
|
32
|
+
in panes. Cursor movement around the terminal. New in 3.8: Fixed border fragments
|
33
|
+
upon utf-8 characters. 3.8.1: Code clean-up'
|
34
34
|
email: g@isene.com
|
35
35
|
executables: []
|
36
36
|
extensions: []
|