nvim 1.9.0 → 1.10.1

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: 769e2a668a793cc62f7683c1e6a40bb0ab703a65c1538a82afe6ef08326d023b
4
- data.tar.gz: aa69006de05ddf6eba0635b6ce35478b8ef074fa3fcd73be300b2d78089436a4
3
+ metadata.gz: 6befdb7ddc3ff092b9cac368d4e245ce44e8322789559a752cb4633fe263a69c
4
+ data.tar.gz: aec8cc511620f318618d577248318b7f9ee72ed40456aa3d8d71ae0f619be436
5
5
  SHA512:
6
- metadata.gz: b3ddad1a7f7719f17e17c1767d3bdf394b5703c24fc700840c2b0e39c332c9290225fc94d5b4abc5d391d979e64a796b11b82bca1c44ef77c0ab4ad7cfbae401
7
- data.tar.gz: 934aff104babc3f80f3265d6f26881cb02b85ad3d8b8cbe53fe3a716e12dc3d5d7c157e1d68a819fc7011fb05f5999562fb08b0bee6bf5cc22c7dbd4268093df
6
+ metadata.gz: 9d382647096ceeba099c8cbfba73c0f150da1b2d61791374a4ca73de44fe195baecce3ac8bb84cd6a5beb68eb319d72970f9cc4ad8eb3d093255782807cbeac3
7
+ data.tar.gz: 84902f55fd2bba21caf85926f31159d05d4559ee4fd20f23a063e2dde899052811a735b94f86a64ef3eca1a9d31ee5faf46d4fc58990747195773e5db6138ca1
data/INFO.yaml CHANGED
@@ -3,7 +3,7 @@
3
3
  #
4
4
 
5
5
  nvim:
6
- version: 1.9.0
6
+ version: 1.10.1
7
7
  license: BSD-2-Clause+
8
8
  authors:
9
9
  - Bertram Scharpf
data/README.md CHANGED
@@ -126,23 +126,28 @@ This results in:
126
126
  :
127
127
  ```
128
128
 
129
- To inhibit the output of the last value, add a minus (`-`) to the
130
- `:ruby|` call.
129
+ To inhibit the output of the last value, set the
130
+ `$result` variable to `false`.
131
+
132
+ | $result | Output |
133
+ | ------------- |---------------------------|
134
+ | `nil` | every result except `nil` |
135
+ | `false` | nothing |
136
+ | `true` | every result, even `nil` |
131
137
 
132
138
  ```
133
- pp Regexp.constants
139
+ 1 $result = true
140
+ 2 puts "hi"
141
+ 3 #=> nil
134
142
  ~
135
143
  ~
136
- :.ruby |-
144
+ :1,2ruby |
137
145
  ```
138
146
 
139
- In this case, you may even omit the pipe (`|`) character.
140
-
141
147
 
142
148
  #### Last return value
143
149
 
144
- The anonymous variable `_` will hold the result
145
- of the last evaluation.
150
+ The anonymous variable `_` will hold the last non-nil result.
146
151
 
147
152
  ```
148
153
  1 7*11*13
@@ -227,6 +232,8 @@ Then:
227
232
  :5ruby |
228
233
  ```
229
234
 
235
+ If `$result` is `false`, `$rescue` will be ignored.
236
+
230
237
  Even non-standard errors wil be caught.
231
238
 
232
239
  ```
@@ -306,9 +313,9 @@ pp $vim.obj_classes.map { |c| [ c.type, ($vim.obj_functions c).sort] }.to_h
306
313
  :%ruby |-
307
314
  ```
308
315
 
309
- Deprecated functions and old functions not starting with `nvim_` will be
310
- hidden. The full list of API functions can be obtained by a call to
311
- `get_api_info`.
316
+ Deprecated functions will be hidden unless you set the environment variable
317
+ `NVIM_RUBY_STRICT=off`. Old functions not starting with `nvim_` will be hidden.
318
+ The full list of API functions can be obtained by a call to `get_api_info`.
312
319
 
313
320
  ```
314
321
  pp $vim.get_api_info
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.9.0",
3
+ version: "1.10.1",
4
4
  license: "BSD-2-Clause+",
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: "a24b682"
10
+ commit: "fa5cec3"
@@ -147,8 +147,7 @@ module Neovim
147
147
  # This is called by the +:ruby+ command.
148
148
  dsl.rpc :ruby_execute do |client,code,fst,lst|
149
149
  code.rstrip!
150
- if code =~ /\A\|?(-)?\z/ then # | is a workaround because Neovim doesn't allow empty code (the ultimate Quine).
151
- no_out = $1
150
+ if code == "|" then # | is a workaround because Neovim doesn't allow empty code (the ultimate Quine).
152
151
  set_globals client, fst..lst do |lines|
153
152
  client.command "#{lst}"
154
153
  WriteBuf.redirect client do
@@ -156,13 +155,11 @@ module Neovim
156
155
  script_binding.eval lines.to_s, "ruby_run"
157
156
  rescue Exception
158
157
  $@.pop until $@.empty? or $@.last.ends_with? ":in `empty_binding'"
159
- raise unless $rescue
158
+ raise unless $rescue and $result != false
160
159
  $!
161
160
  end
162
- unless no_out or r.nil? then
163
- script_binding.local_variable_set :_, r
164
- puts "#=> #{r.inspect}"
165
- end
161
+ script_binding.local_variable_set :_, r unless r.nil?
162
+ puts "#=> #{r.inspect}" if $result or ($result.nil? and not r.nil?)
166
163
  end
167
164
  end
168
165
  elsif code == "+" then
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nvim
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0
4
+ version: 1.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bertram Scharpf
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-03-31 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  email: software@bertram-scharpf.de
13
13
  executables:
@@ -18,7 +18,6 @@ extra_rdoc_files:
18
18
  - LICENSE
19
19
  - README.md
20
20
  - Rakefile
21
- - nvim.gemspec
22
21
  - examples/demo.rb
23
22
  - examples/demo_attach
24
23
  - examples/demo_intar
@@ -27,6 +26,7 @@ extra_rdoc_files:
27
26
  - examples/demo_sub
28
27
  - examples/dump_api
29
28
  - examples/passwords
29
+ - nvim.gemspec
30
30
  files:
31
31
  - INFO.yaml
32
32
  - LICENSE
@@ -79,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
79
  - !ruby/object:Gem::Version
80
80
  version: '0'
81
81
  requirements: []
82
- rubygems_version: 3.6.6
82
+ rubygems_version: 3.6.7
83
83
  specification_version: 4
84
84
  summary: Yet another Ruby client for Neovim
85
85
  test_files: []