rcurses 4.7 → 4.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5bd13b6d8edf4884599788ea2ab4ee0cd74e19c76dd5d8816fee9a8c39af2ed7
4
- data.tar.gz: 710c11b21962f2c833b109dd1991a4e61994db67609ffa41f85ceca7d8f08aaf
3
+ metadata.gz: 3315a5ab0bf9cc3f4db94b09c87de6f06319f34138e3ed5d6b71410202ccecdf
4
+ data.tar.gz: 6e7ef74687339050e3eb2f8e74ccfc42c90d9d1c9aa2a5cdb3d24554d3e8e1d4
5
5
  SHA512:
6
- metadata.gz: 6ba8e09362dd518bf485d0e5d725fe421fe1fa70d03827878581d75c9296645b7edef9450881ae4403fd9fe9fa64208c58d3b196b194d27dd8021bf990bb5e13
7
- data.tar.gz: b1bd57631466afd0da235ee5c4e34e9124c6fd15a40bb2db44bb4ddcf9c8a54d8809c593ed580d64200fab02a4bed315723bb5ad48731f165ed9867453810a3e
6
+ metadata.gz: 20d838d608ac34060d0bb9a8a39f791ec02a302745dbed150bd0cd65ef1ed008803b4c6bb5ea41dbb7da25782ea4f7c6115eb9a6ee4d887208db38c419ee214c
7
+ data.tar.gz: 1dffaed1371b88950bb579dc2173f076b4646cdd69dd9690d6e89ad8d3da954a532c929ce91f1dccada6fa8f670912066364b32b11c8395962d4305d3e6e8196
data/README.md CHANGED
@@ -118,7 +118,7 @@ l | Set text to be printed blinking (example: `"TEST".l`)
118
118
  r | Set text to be printed in reverse colors (example: `"TEST".r`)
119
119
  c(code) | Use coded format like "TEST".c("204,45,bui") to print "TEST" in bold, underline italic, fg=204 and bg=45 (the format is `.c("fg,bg,biulr")`)
120
120
  pure | Strip text of any "dressing" (example: with `text = "TEST".b`, you will have bold text in the variable `text`, then with `text.pure` it will show "uncoded" or pure text)
121
- ansi_clean | Strip seemingly uncolored strings of ansi code (those that are enclosed in "\e[0m"
121
+ clean_ansi | Strip seemingly uncolored strings of ansi code (those that are enclosed in "\e[0m"
122
122
  shorten(n) | Shorten the pure version of the string to 'n' characters, preserving any ANSI coding
123
123
  inject("chars",pos) | Inject "chars" at position 'pos' in the pure version of the string (if 'pos' is '-1', then append at end). Preserves any ANSI code
124
124
 
data/lib/rcurses/pane.rb CHANGED
@@ -176,8 +176,9 @@ module Rcurses
176
176
 
177
177
  o_row, o_col = pos
178
178
 
179
- # Hide cursor and disable auto-wrap (minimal fix)
180
- STDOUT.print "\e[?25l\e[?7l"
179
+ # Hide cursor, disable auto-wrap, reset all SGR and scroll margins
180
+ # (so stray underline, scroll regions, etc. can’t leak out)
181
+ STDOUT.print "\e[?25l\e[?7l\e[0m\e[r"
181
182
 
182
183
  fmt = [@fg.to_s, @bg.to_s].join(',')
183
184
 
@@ -242,8 +243,8 @@ module Rcurses
242
243
  end
243
244
  end
244
245
 
245
- # Re-enable wrap just before printing the final buffer
246
- diff_buf << "\e[#{o_row};#{o_col}H\e[?7h"
246
+ # restore wrap, then also reset SGR and scroll-region one more time
247
+ diff_buf << "\e[#{o_row};#{o_col}H\e[?7h\e[0m\e[r"
247
248
  print diff_buf
248
249
  @prev_frame = new_frame
249
250
 
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: 4.7: Removed the need for user templates on startup/exit. Added attr 'index' to pane
8
+ # Version: 4.8: Bugfix: Removed stray ansi codes
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: '4.7'
4
+ version: '4.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-05-14 00:00:00.000000000 Z
11
+ date: 2025-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clipboard
@@ -30,8 +30,7 @@ description: 'Create curses applications for the terminal easier than ever. Crea
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
32
  in panes. Cursor movement around the terminal. New in 3.8: Fixed border fragments
33
- upon utf-8 characters. 4.7: Removed the need for user templates on startup/exit.
34
- Added attr ''index'' to pane.'
33
+ upon utf-8 characters. 4.8: Bugfix: Removed stray ansi codes.'
35
34
  email: g@isene.com
36
35
  executables: []
37
36
  extensions: []