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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4df34be40dc780445a8534b01d98c59ad0bc0ab05da727e2f40d8a95c74f765c
4
- data.tar.gz: 665cf4edbaee51945bf2940dcb2a1123bf79009bef29b8335d4e965206cb2c70
3
+ metadata.gz: 2d400abbf959061772a9955dbe4fbc14ce0618b5a4d0383f7a508d593c4e3402
4
+ data.tar.gz: a147f00213db4e1fc9ea90aff76cb8d8c0e810c3cb893a7825b0c0c279a40719
5
5
  SHA512:
6
- metadata.gz: 62589684b7ea686899543001bd5f9e27566c1464e7ffda212ac2d4ad1f383bf4386fecaa3e3626844c9cb025bdc9eab1ed3276cf889eb82bfab85c7d2efef8c3
7
- data.tar.gz: 636cc302ddefadd6e9c4daa7b807da7b0254eec09804ca0b3efd9c5b32228db0901a10a7d25683c3b046f81408cf6685c2c3f4c00a78086756b3e04c7fc10272
6
+ metadata.gz: 50505d6d75eb31ff042ba1494b803382d693ce5703416917f2bb390e005fae2eb96ac704c4a2a1356496054ab2f27663a81c3b0313ebba974874accc08bddb33
7
+ data.tar.gz: d6ea941226c7bf1d3f2ce19e4a694349902039ca7f8804996fd02ea20f34e3b3c8b2aa40e4021066a13469c81b1d212f13cf62897b2709d96d34fb959df0d88f
data/INFO.yaml CHANGED
@@ -3,7 +3,7 @@
3
3
  #
4
4
 
5
5
  nvim:
6
- version: "1.14.1"
6
+ version: "1.15"
7
7
  license: LicenseRef-BSD-2-Clause-and-DECENT_LANGUAGE
8
8
  authors:
9
9
  - Bertram Scharpf
@@ -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
- def axe n
31
+ ELLIPSE = :"..."
32
+ def axe n = 80
31
33
  if n < length then
32
- e = "..."
33
- l = e.length
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
- (slice 0, n) << "..."[0,l]
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.14.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: "5b9a1c2"
10
+ commit: "8c2c256"
@@ -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 = begin
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nvim
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.14.1
4
+ version: '1.15'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bertram Scharpf