helpline 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b46831b912140d384be779ff12f530462457a20899e8fe96f073436655831fc
4
- data.tar.gz: ef8ff02acc4e8f25b4bed9b07b25d9c736a8ff6a90096d657f8905cf09cbb821
3
+ metadata.gz: e2b4bd43a7abba5efc9ba94b4147be41d7106bf6bbf3832587601bc4a4421084
4
+ data.tar.gz: a4e5db23fc30f5009bf22e2ac24ad07da6ebda7690f0fb6140268c07e612765b
5
5
  SHA512:
6
- metadata.gz: fbe21e1d7af765a12be93d1c0d6cafca68bf9c58d7261da12d6a2306a5be3e60b708e94e6ff84650cfd996e9153ee627312cb6cfe8874f2cbb55757014dfed27
7
- data.tar.gz: f8d7372ae4f8b6710c0a2e4d15de931868bd7f3f17f6533fdc3e9aabb753fa68a9923565e675de5d225f566b45e56d2364b4ac4689c819784b0179b44ef3a32e
6
+ metadata.gz: 9d7f707aa3220a134a403f62ca0ee212caa944668ccb6e97799d4aa2d5eb1f66f7725c6d6491c2662506fd074435b14eb007c2b64e00c9e9e66e7baa2e8a01ee
7
+ data.tar.gz: 29aa3951271e1a640e3cee3727d85df7baa7269abb9e73caa865d41eb186eb5600d4ff86fbc6f568e4f7b750dc97b38294e1d8dbe215692bd85665d9f037191e
@@ -130,17 +130,17 @@ class HelpLine
130
130
  #
131
131
  # HelpLineエントリ
132
132
  #
133
- lines = []
133
+ entries = []
134
134
  data['defs'].each { |line|
135
135
  if line =~ /^\s*\$\s*(.*)$/ # $....
136
- lines << $1
136
+ entries << $1
137
137
  elsif line =~ /^\s*\%\s*(.*)$/ # %....
138
138
  cmd = $1
139
- lines.each { |l|
139
+ entries.each { |l|
140
140
  desc = eval('"' + l + '"')
141
141
  g.add desc.force_encoding('utf-8'), cmd.force_encoding('utf-8')
142
142
  }
143
- lines = []
143
+ entries = []
144
144
  end
145
145
  }
146
146
 
@@ -180,6 +180,9 @@ class HelpLine
180
180
  sel = 0
181
181
  disp(list,sel)
182
182
 
183
+ lines = list.length
184
+ lines = LINES if lines > LINES
185
+
183
186
  inputchars = ''
184
187
  while true
185
188
  c = STDIN.getch
@@ -197,7 +200,7 @@ class HelpLine
197
200
  inputchars = ''
198
201
  elsif inputchars == "\x0e" || inputchars == "\e[B" || inputchars == "\eOB"
199
202
  Curses.down
200
- sel = (sel + 1) if sel < LINES-1
203
+ sel = (sel + 1) if sel < lines-1
201
204
  inputchars = ''
202
205
  elsif inputchars == "\x10" || inputchars == "\e[A" || inputchars == "\eOA"
203
206
  Curses.up
@@ -219,7 +222,7 @@ class HelpLine
219
222
  desc = list[sel.to_i][0]
220
223
  cmd = list[sel][1]
221
224
 
222
- Curses.move(lines.length,0)
225
+ Curses.move(lines,0)
223
226
  #Curses.move(0,0)
224
227
  ##Curses.down
225
228
  ##Curses.tol
@@ -1,3 +1,3 @@
1
1
  module Helpline
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: helpline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toshiyuki Masui