kv 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/FUNDING.yml +3 -0
- data/lib/kv.rb +7 -4
- data/lib/kv/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 573415b451a9344ac21da113782892338606925a3dd04c57d3e82805a5e55de2
|
4
|
+
data.tar.gz: 7d29a38d796aacb6d769a31c52313fc6e510ff68de5e51615e9ce7357e2f3b1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf24a502a46eead71095315a4d1e7c76872e849c04360e2d740e6521704ce56b75126fa45f7bfceb1b983845f4e0d9bf189fbde870e001a3a580b6b076116139
|
7
|
+
data.tar.gz: 720ac127b0e1960712493473d12254ec39b28c84f80cc0b7a99631728038da9e31a85f1970274badc89b36943632b938b3b557ac0633dd815e477259d248cdcf
|
data/.github/FUNDING.yml
ADDED
data/lib/kv.rb
CHANGED
@@ -20,7 +20,8 @@ end
|
|
20
20
|
class Screen
|
21
21
|
RenderStatus = Struct.new(
|
22
22
|
:c_cols, :c_lines, :x, :y, :last_lineno,
|
23
|
-
:search, :goto, :
|
23
|
+
:search, :goto, :wrapping,
|
24
|
+
:line_mode, :ts_mode, :separation_mode,
|
24
25
|
)
|
25
26
|
class RenderStatus
|
26
27
|
def to_s
|
@@ -42,6 +43,7 @@ class Screen
|
|
42
43
|
@rs.search = search
|
43
44
|
@rs.wrapping = false
|
44
45
|
@rs.ts_mode = false
|
46
|
+
@rs.separation_mode = separation_mode
|
45
47
|
|
46
48
|
@name = name
|
47
49
|
@filename = @name if @name && File.exist?(@name)
|
@@ -49,7 +51,6 @@ class Screen
|
|
49
51
|
@time_stamp = time_stamp
|
50
52
|
@ext_input = ext_input
|
51
53
|
@fifo_file = fifo_file
|
52
|
-
@separation_mode = separation_mode
|
53
54
|
|
54
55
|
@lines = lines
|
55
56
|
@mode = :screen
|
@@ -222,7 +223,7 @@ class Screen
|
|
222
223
|
|
223
224
|
Curses.clear
|
224
225
|
|
225
|
-
if @separation_mode && (lines = @lines[self.y ... (self.y + c_lines - 1)])
|
226
|
+
if @rs.separation_mode && (lines = @lines[self.y ... (self.y + c_lines - 1)])
|
226
227
|
max_cols = []
|
227
228
|
lines.each.with_index{|line, ln|
|
228
229
|
line.split("\t").each_with_index{|w, i|
|
@@ -273,7 +274,7 @@ class Screen
|
|
273
274
|
|
274
275
|
line = line[self.x, cols] || ''
|
275
276
|
|
276
|
-
if @separation_mode
|
277
|
+
if @rs.separation_mode
|
277
278
|
line = line.split(/\t/).tap{|e|
|
278
279
|
if (max = max_cols.size) > 0
|
279
280
|
# fill empty columns
|
@@ -658,6 +659,8 @@ class Screen
|
|
658
659
|
@rs.line_mode = !@rs.line_mode
|
659
660
|
when 'T'
|
660
661
|
@rs.ts_mode = !@rs.ts_mode if @time_stamp
|
662
|
+
when 'S'
|
663
|
+
@rs.separation_mode = !@rs.separation_mode
|
661
664
|
when 't'
|
662
665
|
Curses.close_screen
|
663
666
|
@mode = :terminal
|
data/lib/kv/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Koichi Sasada
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: curses
|
@@ -32,6 +32,7 @@ executables:
|
|
32
32
|
extensions: []
|
33
33
|
extra_rdoc_files: []
|
34
34
|
files:
|
35
|
+
- ".github/FUNDING.yml"
|
35
36
|
- ".gitignore"
|
36
37
|
- LICENSE
|
37
38
|
- README.md
|
@@ -61,8 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
61
62
|
- !ruby/object:Gem::Version
|
62
63
|
version: '0'
|
63
64
|
requirements: []
|
64
|
-
|
65
|
-
rubygems_version: 2.7.6
|
65
|
+
rubygems_version: 3.1.2
|
66
66
|
signing_key:
|
67
67
|
specification_version: 4
|
68
68
|
summary: 'kv: A page viewer written by Ruby'
|