mancurses 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +9 -12
- data/bin/mancurses +11 -3
- data/mancurses.gemspec +1 -1
- metadata +4 -4
data/README.md
CHANGED
@@ -14,23 +14,20 @@ Use "/" to search for strings within the page displayed.
|
|
14
14
|
|
15
15
|
Use '?' to see bindings.
|
16
16
|
|
17
|
-
When pressing F1 for help or "?" for bindings, and returning, the background is black. You need to
|
18
|
-
press a key for it to refresh. I am figuring this out.
|
19
|
-
|
20
17
|
## General
|
21
18
|
|
22
|
-
|
23
|
-
|
19
|
+
This gem is not really gonna make much difference to you. It's faster to just type `man grep` on the
|
20
|
+
command line and 'q' to get out. It's not like you keep manning pages one after another.
|
21
|
+
|
22
|
+
I am writing this to test out a new text widget which uses a pad. I hope to replace the current
|
23
|
+
text widgets such as textview and list and maybe tabular and tree in rbcurse-core with this.
|
24
24
|
|
25
|
-
|
26
|
-
text widgets such as textview and list and maybe tabular and tree in rbcurse-core with this.
|
25
|
+
Currently, using a window requires a lot of work each time one scrolls around. Too much string creation , truncation, sanitizing and gc going on repeatedly. Using a pad simplifies all this.
|
27
26
|
|
28
|
-
|
27
|
+
However, pad is not without its issues. If I have two pads on the screen, and a popup is displayed,
|
28
|
+
then a black rectangle is left on the other pad. I would have to tab there and scroll for a `prefresh` to happen. Otherwise, the app needs to do some book-keeping of underlying pads created and refresh them when a messagebox or window closes.
|
29
29
|
|
30
|
-
|
31
|
-
then a black rectangle is left on the other pad. I would have to tab there and scroll for a `prefresh` to happen. Otherwise, the app needs to do some book-keeping of underlying pads created and refresh them when a messagebox or window closes.
|
32
|
-
|
33
|
-
If i cannot manage that reliably, then i cannot include this in the main rbcurse-core.
|
30
|
+
If i cannot manage that reliably, then i cannot include this in the main rbcurse-core.
|
34
31
|
|
35
32
|
## Contributing
|
36
33
|
|
data/bin/mancurses
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
# Author: rkumar http://github.com/rkumar/mancurses/
|
9
9
|
# Date: 2011-11-09 - 16:59
|
10
10
|
# License: Same as Ruby's License (http://www.ruby-lang.org/LICENSE.txt)
|
11
|
-
# Last update: 2013-03-08
|
11
|
+
# Last update: 2013-03-08 21:03
|
12
12
|
#
|
13
13
|
# == CHANGES
|
14
14
|
# == TODO
|
@@ -171,6 +171,7 @@ module RubyCurses
|
|
171
171
|
## 2013-03-07 - 19:57 changed width to @content_cols since data not printing
|
172
172
|
# in some cases fully when ansi sequences were present int some line but not in others
|
173
173
|
# lines without ansi were printing less by a few chars.
|
174
|
+
# This was prolly copied from rwindow, where it is okay since its for a specific width
|
174
175
|
def print(string, _width = @content_cols)
|
175
176
|
#return unless visible?
|
176
177
|
w = _width == 0? Ncurses.COLS : _width
|
@@ -239,6 +240,12 @@ module RubyCurses
|
|
239
240
|
|
240
241
|
public
|
241
242
|
def repaint
|
243
|
+
## 2013-03-08 - 21:01 This is the fix to the issue of form callign an event like ? or F1
|
244
|
+
# which throws up a messagebox which leaves a black rect. We have no place to put a refresh
|
245
|
+
# However, form does call repaint for all objects, so we can do a padref here. Otherwise,
|
246
|
+
# it would get rejected. UNfortunately this may happen more often we want, but we never know
|
247
|
+
# when something pops up on the screen.
|
248
|
+
padrefresh unless @repaint_required
|
242
249
|
return unless @repaint_required
|
243
250
|
if @formatted_text
|
244
251
|
$log.debug "XXX: INSIDE FORMATTED TEXT "
|
@@ -462,9 +469,10 @@ module RubyCurses
|
|
462
469
|
$log.error " TEXTPAD ERROR INS #{err} "
|
463
470
|
$log.debug(err.backtrace.join("\n"))
|
464
471
|
textdialog ["Error in TextPad: #{err} ", *err.backtrace], :title => "Exception"
|
465
|
-
# FIXME why does this result in a blank spot on screen till its refreshed again
|
466
|
-
# should not happen if its deleting its panel and doing an update panel
|
467
472
|
end
|
473
|
+
## NOTE if textpad does not handle the event and it goes to form which pops
|
474
|
+
# up a messagebox, then padrefresh does not happen, since control does not
|
475
|
+
# come back here, so a black rect is left on screen
|
468
476
|
return :UNHANDLED if ret == :UNHANDLED
|
469
477
|
end
|
470
478
|
bounds_check
|
data/mancurses.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "mancurses"
|
7
|
-
spec.version = "0.0.
|
7
|
+
spec.version = "0.0.2"
|
8
8
|
spec.authors = ["Rahul Kumar"]
|
9
9
|
spec.email = ["sentinel1879@gmail.com"]
|
10
10
|
spec.description = %q{view manpages in an ncurses window and navigate with vim bindings}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mancurses
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -89,7 +89,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
89
89
|
version: '0'
|
90
90
|
segments:
|
91
91
|
- 0
|
92
|
-
hash:
|
92
|
+
hash: 2382845020894572024
|
93
93
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
98
98
|
version: '0'
|
99
99
|
segments:
|
100
100
|
- 0
|
101
|
-
hash:
|
101
|
+
hash: 2382845020894572024
|
102
102
|
requirements: []
|
103
103
|
rubyforge_project:
|
104
104
|
rubygems_version: 1.8.25
|