ruby-zoom 5.2.4 → 5.3.0
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/lib/zoom/editor.rb +29 -14
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 142f012f19627bbd7fd91f9177af11aa8bef1e4f7c4a06f269775ee64c9d9c85
|
4
|
+
data.tar.gz: a558e2fb27f3b7dd5a6054ba75eb869b979f9225db56b2ec955ecaafbed5f8d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d609b04d7b73b15909642f2542b4178e8339d6ff2570270973bfffc02cbf8456e1449b15a6d18fe19ecb46668c48e81f8ee5ae6ccff55121cbd945a3382c68b9
|
7
|
+
data.tar.gz: df9abdb6910f1543cce1a03e9756ded0e668a38872a9946a436718ab3dc8306a214dd13a438cb09c7b783d70b349ce194bf06543e2de5b54178794ceefb5ee13
|
data/lib/zoom/editor.rb
CHANGED
@@ -64,16 +64,20 @@ class Zoom::Editor
|
|
64
64
|
|
65
65
|
def open_result(result)
|
66
66
|
if (result.grep_like?)
|
67
|
-
|
67
|
+
if (result.filename.start_with?("/"))
|
68
|
+
filename = result.filename
|
69
|
+
else
|
70
|
+
filename = result.pwd + "/" + result.filename
|
71
|
+
end
|
68
72
|
lineno = result.lineno
|
69
|
-
|
70
|
-
system(
|
71
|
-
"#{@editor} #{@flags} +#{lineno} '#{pwd}/#{filename}'"
|
72
|
-
)
|
73
|
+
system("#{@editor} #{@flags} +#{lineno} '#{filename}'")
|
73
74
|
else
|
74
|
-
|
75
|
-
|
76
|
-
|
75
|
+
if (result.contents.start_with?("/"))
|
76
|
+
filename = result.contents
|
77
|
+
else
|
78
|
+
filename = result.pwd + "/" + result.contents
|
79
|
+
end
|
80
|
+
system("#{@editor} #{@flags} '#{filename}'")
|
77
81
|
end
|
78
82
|
end
|
79
83
|
private :open_result
|
@@ -101,19 +105,30 @@ class Zoom::Editor
|
|
101
105
|
|
102
106
|
files = Array.new
|
103
107
|
results.each do |result|
|
104
|
-
|
105
|
-
|
108
|
+
if (result.grep_like?)
|
109
|
+
if (result.filename.start_with?("/"))
|
110
|
+
filename = result.filename
|
111
|
+
else
|
112
|
+
filename = result.pwd + "/" + result.filename
|
113
|
+
end
|
114
|
+
else
|
115
|
+
if (result.contents.start_with?("/"))
|
116
|
+
filename = result.contents
|
117
|
+
else
|
118
|
+
filename = result.pwd + "/" + result.contents
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
106
122
|
lineno = result.lineno
|
107
123
|
match = result.match
|
108
|
-
pwd = result.pwd
|
109
124
|
|
110
|
-
if (!files.include?(
|
111
|
-
files.push(
|
125
|
+
if (!files.include?(filename))
|
126
|
+
files.push(filename)
|
112
127
|
zs.write("#{lineno}\nbnext\n") if (result.grep_like?)
|
113
128
|
end
|
114
129
|
|
115
130
|
if (result.grep_like?)
|
116
|
-
zq.write("#{
|
131
|
+
zq.write("#{filename}:#{lineno}: #{match}\n")
|
117
132
|
end
|
118
133
|
end
|
119
134
|
zs.write("silent cfile #{quickfix}\n")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-zoom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Whittaker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|