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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -2
  3. data/lib/rcurses/pane.rb +11 -1
  4. metadata +3 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aed95a107616226e2f90aaf5db3dbfd3cddfbb905254e31115857d882741fa61
4
- data.tar.gz: ba178a044ed384e5bc3c2c53af77cc654eb96977316e1464f3b0be3e8c35694f
3
+ metadata.gz: b690f977339cf36287c04aa4b7cf7b06c3d917ac43149d80218c38d04aec02e5
4
+ data.tar.gz: 2e36b22211f5ea26f7fe1fd08092a33e2373d4e811eede99dd09a3e55deca5f5
5
5
  SHA512:
6
- metadata.gz: 1af985cfb5ecb496bcf321a4429c8b038528c8ba46191eae4e4304746e0ca61a517268342dbf4293f004553e57222f95e96fc67c78710d605ad33a57a0cfcb14
7
- data.tar.gz: 3e8232f1023544530e6728a5a1be196764e0296765eb5d3639b63b34fd645b592a49a3efcc0109dcda6597a35e5f280337a6c6e08d3602cfd588e90c39938de0
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 | Go down one page height in the text (minus one line), but not longer than the length of the text
85
- pageup | Go up one page height in the text (minus one line)
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 - 1 if @ix > @text.length - 1
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.6.1
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.6: Added methods ''pagedown''
33
- and ''pageup'' to panes enabling text scrolling. 2.6.1: Resetting index ''ix'' to
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: []