nvim 1.14.1 → 1.15
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/INFO.yaml +1 -1
- data/lib/neovim/foreign/supplement.rb +19 -6
- data/lib/neovim/info.rb +2 -2
- data/lib/neovim/ruby_provider.rb +8 -8
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2d400abbf959061772a9955dbe4fbc14ce0618b5a4d0383f7a508d593c4e3402
|
|
4
|
+
data.tar.gz: a147f00213db4e1fc9ea90aff76cb8d8c0e810c3cb893a7825b0c0c279a40719
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 50505d6d75eb31ff042ba1494b803382d693ce5703416917f2bb390e005fae2eb96ac704c4a2a1356496054ab2f27663a81c3b0313ebba974874accc08bddb33
|
|
7
|
+
data.tar.gz: d6ea941226c7bf1d3f2ce19e4a694349902039ca7f8804996fd02ea20f34e3b3c8b2aa40e4021066a13469c81b1d212f13cf62897b2709d96d34fb959df0d88f
|
data/INFO.yaml
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
begin
|
|
8
8
|
require "supplement"
|
|
9
9
|
rescue LoadError
|
|
10
|
+
class NilClass ; def nonzero? ; end ; end
|
|
10
11
|
class NilClass ; def notempty? ; end ; end
|
|
11
12
|
class String ; def notempty? ; self unless empty? ; end ; end
|
|
12
13
|
class Array ; def notempty? ; self unless empty? ; end ; end
|
|
@@ -27,20 +28,32 @@ rescue LoadError
|
|
|
27
28
|
end
|
|
28
29
|
end
|
|
29
30
|
class String
|
|
30
|
-
|
|
31
|
+
ELLIPSE = :"..."
|
|
32
|
+
def axe n = 80
|
|
31
33
|
if n < length then
|
|
32
|
-
|
|
33
|
-
l
|
|
34
|
-
if n > l then
|
|
34
|
+
l = ELLIPSE.length
|
|
35
|
+
if n >= l then
|
|
35
36
|
n -= l
|
|
36
37
|
else
|
|
37
|
-
l = 0
|
|
38
|
+
n, l = 0, n
|
|
38
39
|
end
|
|
39
|
-
|
|
40
|
+
self[ 0, n] << ELLIPSE[0,l]
|
|
40
41
|
else
|
|
41
42
|
self
|
|
42
43
|
end
|
|
43
44
|
end
|
|
45
|
+
def axe! n = 80
|
|
46
|
+
if n < length then
|
|
47
|
+
l = ELLIPSE.length
|
|
48
|
+
if n >= l then
|
|
49
|
+
n -= l
|
|
50
|
+
else
|
|
51
|
+
n, l = 0, n
|
|
52
|
+
end
|
|
53
|
+
slice! n...nil
|
|
54
|
+
self << ELLIPSE[0,l]
|
|
55
|
+
end
|
|
56
|
+
end
|
|
44
57
|
def starts_with? oth ; o = oth.to_str ; o.length if start_with? o ; end
|
|
45
58
|
def ends_with? oth ; o = oth.to_str ; length - o.length if end_with? o ; end
|
|
46
59
|
alias starts_with starts_with?
|
data/lib/neovim/info.rb
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
require "neovim/meta.rb"
|
|
2
2
|
Neovim::INFO = Neovim::Meta.new "nvim",
|
|
3
|
-
version: "1.
|
|
3
|
+
version: "1.15",
|
|
4
4
|
license: "LicenseRef-BSD-2-Clause-and-DECENT_LANGUAGE",
|
|
5
5
|
authors: ["Bertram Scharpf"],
|
|
6
6
|
email: "software@bertram-scharpf.de",
|
|
7
7
|
summary: "Yet another Ruby client for Neovim",
|
|
8
8
|
description: "A simple Ruby client for Neovim.\nClean code, minimal dependecies, no frills, no wokeness.",
|
|
9
9
|
homepage: "https://github.com/BertramScharpf/ruby-nvim",
|
|
10
|
-
commit: "
|
|
10
|
+
commit: "8c2c256"
|
data/lib/neovim/ruby_provider.rb
CHANGED
|
@@ -156,15 +156,15 @@ module Neovim
|
|
|
156
156
|
set_globals client, fst..lst do |lines|
|
|
157
157
|
client.command "#{lst}"
|
|
158
158
|
WriteBuf.redirect client, follow: true do
|
|
159
|
-
r =
|
|
160
|
-
script_binding.eval lines.to_s, "ruby_run"
|
|
161
|
-
rescue Exception
|
|
162
|
-
$@.pop until $@.empty? or $@.last =~ /:\d+:in .*\bempty_binding\W*$/
|
|
163
|
-
raise unless $rescue and $result != false
|
|
164
|
-
$!
|
|
165
|
-
end
|
|
166
|
-
script_binding.local_variable_set :_, r unless r.nil?
|
|
159
|
+
r = script_binding.eval lines.to_s, "ruby_run"
|
|
167
160
|
puts "#=> #{r.inspect}" if $result or ($result.nil? and not r.nil?)
|
|
161
|
+
script_binding.local_variable_set :_, r unless r.nil?
|
|
162
|
+
rescue Exception
|
|
163
|
+
$@.pop until $@.empty? or $@.last =~ /:\d+:in .*\bempty_binding\W*$/
|
|
164
|
+
raise unless $rescue and $result != false
|
|
165
|
+
puts "#!= #{$!.class}"
|
|
166
|
+
$!.message.each_line { |l| puts "#! #{l}" }
|
|
167
|
+
script_binding.local_variable_set :_, $!
|
|
168
168
|
end
|
|
169
169
|
end
|
|
170
170
|
elsif code == "+" then
|