rcurses 2.6.1 → 2.7
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/README.md +4 -2
- data/lib/rcurses/pane.rb +11 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b690f977339cf36287c04aa4b7cf7b06c3d917ac43149d80218c38d04aec02e5
|
4
|
+
data.tar.gz: 2e36b22211f5ea26f7fe1fd08092a33e2373d4e811eede99dd09a3e55deca5f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 811a2f83630b5e570c6bab2bf0d635fef7a5a3ae524bc9f97dbf6a3c3f3f77abdbe8db988ddf35b7cc664322783453df16d974b179b5bc976a0499e4fcc3cf80
|
7
|
+
data.tar.gz: 9960da711a664264ff48ec7f7dafdc40e68e190bb265bfd12e1c94b0b94a0b2607de04758f5993b53f4732c4804c9f925eabf6e8a5a0b88b16f0814a6222849c
|
data/README.md
CHANGED
@@ -81,8 +81,10 @@ edit | An editor for the Pane. When this is invoked, all existing font
|
|
81
81
|
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
|
82
82
|
puts(text) | Short form for setting panel.text, then doing a refresh of that panel
|
83
83
|
ask(prompt,text) | Short form of setting panel.prompt, then panel.text, doing a panel.editline and then returning panel.text
|
84
|
-
pagedown |
|
85
|
-
pageup |
|
84
|
+
pagedown | Scroll down one page height in the text (minus one line), but not longer than the length of the text
|
85
|
+
pageup | Scroll up one page height in the text (minus one line)
|
86
|
+
bottom | Scroll to the bottom of the text in the pane
|
87
|
+
top | Scroll to the top of the text in the pane
|
86
88
|
|
87
89
|
# class String extensions
|
88
90
|
Method extensions provided for the class String:
|
data/lib/rcurses/pane.rb
CHANGED
@@ -47,7 +47,17 @@ module Rcurses
|
|
47
47
|
|
48
48
|
def pagedown
|
49
49
|
@ix = @ix + @h - 1
|
50
|
-
@ix = @text.length -
|
50
|
+
@ix = @text.split("\n").length - @h if @ix > @text.split("\n").length - @h
|
51
|
+
refresh
|
52
|
+
end
|
53
|
+
|
54
|
+
def top
|
55
|
+
@ix = 0
|
56
|
+
refresh
|
57
|
+
end
|
58
|
+
|
59
|
+
def bottom
|
60
|
+
@ix = @text.split("\n").length - @h
|
51
61
|
refresh
|
52
62
|
end
|
53
63
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rcurses
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: '2.7'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geir Isene
|
@@ -29,9 +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 2.
|
33
|
-
and ''
|
34
|
-
0 on pane methods ''puts'' and ''editline''.'
|
32
|
+
in panes. Cursor movement around the terminal. New in 2.7: Added pane methods ''top''
|
33
|
+
and ''bottom'' for text scrolling in pane.'
|
35
34
|
email: g@isene.com
|
36
35
|
executables: []
|
37
36
|
extensions: []
|