rcurses 3.7.4 → 3.8

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rcurses/pane.rb +8 -15
  3. data/lib/rcurses.rb +1 -1
  4. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 99de81db114994df5e644c92cb0e569a860af945279861d6177d78daed01daa6
4
- data.tar.gz: 322659ed626414c180d676b518aeaea38fdf54ae0175e7e9a489bc62e107dd6c
3
+ metadata.gz: 423857a2047f4ee924c2d339d4d6971158a97e0de5998e81d9c27cc2c6ad0cc8
4
+ data.tar.gz: eaf71c2c3c559fbdff2c946875b0ec3ee1a5d2296fe7a501368a46790edbb496
5
5
  SHA512:
6
- metadata.gz: 3b6cebb875b3452447c5e3675a241964882b0c8446ab83fa169990eab04d3730fbef311743595fe4df8b0079385de91e4d117865dfb0bfb6ac2b043a21025661
7
- data.tar.gz: e2f7d8eb9a5dd661ca17613a13d0098bdf2e9478c8d0a8ad0556ffa7c75cabb7255eab8c4c996480d40599b2ff64ca383ade195793ba721749d5876bf7dbf807
6
+ metadata.gz: 297b2ceaa57f8abe2b727efb58d03efcefa2226a62af8b2436f97bbf5b3d0ccda72335ca312d356d905876b0d88396a8bd11e5aa45778dbbc85cc91e5836f0af
7
+ data.tar.gz: fc23a173b5e555c533e92f34821da8808a0712b709242dbc5374ceebf15f179aaee5273a3d61767210c246b45d90c76bd37560d39f935f4746c61f8c667e3ad0
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,22 +201,13 @@ 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 = @border ? (@y - 1 + i) : (@y + i)
223
- col_num = @border ? (@x - 1) : @x
209
+ row_num = @y + i
210
+ col_num = @x
224
211
  if @prev_frame.nil? || @prev_frame[i] != line ||
225
212
  (@border && (i == 0 || i == new_frame.size - 1))
226
213
  diff_buf << "\e[#{row_num};#{col_num}H" << line
@@ -246,9 +233,15 @@ module Rcurses
246
233
  end
247
234
 
248
235
  if @border
236
+ # top
237
+ print "\e[#{@y - 1};#{@x - 1}H" + ("┌" + "─" * @w + "┐").c(fmt)
238
+ # sides
249
239
  (0...@h).each do |i|
240
+ print "\e[#{@y + i};#{@x - 1}H" + "│".c(fmt)
250
241
  print "\e[#{@y + i};#{@x + @w}H" + "│".c(fmt)
251
242
  end
243
+ # bottom
244
+ print "\e[#{@y + @h};#{@x - 1}H" + ("└" + "─" * @w + "┘").c(fmt)
252
245
  end
253
246
 
254
247
  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.7.4: Fixed editline pos bug
8
+ # Version: 3.8: Fixed border fragments upon utf-8 characters
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.7.4
4
+ version: '3.8'
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-20 00:00:00.000000000 Z
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.7.4: Fixed editline pos
33
- bug.'
32
+ in panes. Cursor movement around the terminal. New in 3.8: Fixed border fragments
33
+ upon utf-8 characters.'
34
34
  email: g@isene.com
35
35
  executables: []
36
36
  extensions: []