rcurses 3.4.2 → 3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1dedc4f074f0fb22d35c46607f6d6a3e9d5d9b70a41cf55f677eaec9a6074b39
4
- data.tar.gz: 136e8e4dfaae2d416e7a681d0eb9167000e9d9c0e8214e82e90899ca78302b64
3
+ metadata.gz: dc6cef8a23619d8defb4759eb7e815065a1fb8f7ea92cf7c0c9ef7cfecd20a1a
4
+ data.tar.gz: 8453b9fc72c7a20dc5d83a42d2b54fc3e678eca43c9a5bdfcb9ae50ff917d2f0
5
5
  SHA512:
6
- metadata.gz: 487faf40ebff1682b386db0dee77af305ddae16e396339686507b50595a7f84253cc5e497825cf8d21a10e98d3bc029220c9789f53d306725aada571300c3417
7
- data.tar.gz: 1f49d400171fffd2a34f8da725c2910df327a97d8dc58dba7a3997c01b796a60008fe3d6ae3b97fe95a58b4abd6f550bcaef5d1cf7bfa99e645dcb5eac1a90a4
6
+ metadata.gz: 30e20fa2e1fe8989088ca98a06b61ce4fb27a7fbd1d7426e176b9f9f03c2e458fd1ec57ca37f71c9eeb3e76ae77f680baf5e8754d957adf835db9abf2bd45ad7
7
+ data.tar.gz: df8a5e18d77f943003b5aed5a847107abf8e435f9ca18c125d723406ebd25f4d796ce407c9e3e8a004b07872087b6a21fd11b41c4a6f7cfd208d8838edcbf91c
data/README.md CHANGED
@@ -82,6 +82,7 @@ refresh | Refreshes/redraws the Pane with content
82
82
  full_refresh | Refreshes/redraws the Pane with content completely (without diff rendering)
83
83
  edit | An editor for the Pane. When this is invoked, all existing font dressing is stripped and the user gets to edit the raw text. The user can add font effects similar to Markdown; Use an asterisk before and after text to be drawn in bold, text between forward-slashes become italic, and underline before and after text means the text will be underlined, a hash-sign before and after text makes the text reverse colored. You can also combine a whole set of dressings in this format: `<23,245,biurl|Hello World!>` - this will make "Hello World!" print in the color 23 with the background color 245 (regardless of the Pane's fg/bg setting) in bold, italic, underlined, reversed colored and blinking. Hitting `ESC` while in edit mode will disregard the edits, while `Ctrl-S` will save the edits
84
84
  editline | Used for one-line Panes. It will print the content of the property `prompt` and then the property `text` that can then be edited by the user. Hitting `ESC` will disregard the edits, while `ENTER` will save the edited text
85
+ clear | Clears the pane
85
86
  say(text) | Short form for setting panel.text, then doing a refresh of that panel
86
87
  ask(prompt,text) | Short form of setting panel.prompt, then panel.text, doing a panel.editline and then returning panel.text
87
88
  pagedown | Scroll down one page height in the text (minus one line), but not longer than the length of the text
data/lib/rcurses/pane.rb CHANGED
@@ -76,6 +76,12 @@ module Rcurses
76
76
  refresh
77
77
  end
78
78
 
79
+ def clear
80
+ @text = ""
81
+ @ix = 0
82
+ full_refresh
83
+ end
84
+
79
85
  def move(dx, dy)
80
86
  @x += dx
81
87
  @y += dy
@@ -481,7 +487,7 @@ module Rcurses
481
487
  cont = ''
482
488
  @pos = 0
483
489
  when 'ENTER'
484
- @text = parse(cont)
490
+ @text = cont
485
491
  chr = 'ESC'
486
492
  when 'UP'
487
493
  if @history.any? && history_index > 0
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.4.2: Changed method 'puts' to 'say'
8
+ # Version: 3.5: Added method 'clear' to pane class
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.2
4
+ version: '3.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: 2025-04-08 00:00:00.000000000 Z
11
+ date: 2025-04-10 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.4.2: Changed method ''puts''
33
- to ''say''.'
32
+ in panes. Cursor movement around the terminal. New in 3.5: Added method ''clear''
33
+ to pane class.'
34
34
  email: g@isene.com
35
35
  executables: []
36
36
  extensions: []