nvim 1.9.0 → 1.10.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 769e2a668a793cc62f7683c1e6a40bb0ab703a65c1538a82afe6ef08326d023b
4
- data.tar.gz: aa69006de05ddf6eba0635b6ce35478b8ef074fa3fcd73be300b2d78089436a4
3
+ metadata.gz: bc85eeab49096ed77dd13e5180ab09be73eefbfe902c1b072df4a4a1e43a3ab4
4
+ data.tar.gz: dfe8c784d1fa82258905ab6391a6ff5a96452fabf2c48a04d252080e9a7d91e5
5
5
  SHA512:
6
- metadata.gz: b3ddad1a7f7719f17e17c1767d3bdf394b5703c24fc700840c2b0e39c332c9290225fc94d5b4abc5d391d979e64a796b11b82bca1c44ef77c0ab4ad7cfbae401
7
- data.tar.gz: 934aff104babc3f80f3265d6f26881cb02b85ad3d8b8cbe53fe3a716e12dc3d5d7c157e1d68a819fc7011fb05f5999562fb08b0bee6bf5cc22c7dbd4268093df
6
+ metadata.gz: '09a1efb791771fe4ff4e07d18dfc1c7c6692d052227177fdcc53b1f2b3c708426c8b726e5378b010d466f8c925b53cab234bdc0750162263e39dfb8e0ab2efd8'
7
+ data.tar.gz: 4528ee24eedd1cedd741c9e195372a63e70131ba0a6adbed692fcf21c6cc6ce52bbccf88151a096070b706667aec5ec0dc58f8350400bfda6399eec5b5682e84
data/INFO.yaml CHANGED
@@ -3,7 +3,7 @@
3
3
  #
4
4
 
5
5
  nvim:
6
- version: 1.9.0
6
+ version: 1.10.0
7
7
  license: BSD-2-Clause+
8
8
  authors:
9
9
  - Bertram Scharpf
data/README.md CHANGED
@@ -126,18 +126,24 @@ 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
 
@@ -227,6 +233,8 @@ Then:
227
233
  :5ruby |
228
234
  ```
229
235
 
236
+ If `$result` is `false`, `$rescue` will be ignored.
237
+
230
238
  Even non-standard errors wil be caught.
231
239
 
232
240
  ```
@@ -306,9 +314,9 @@ pp $vim.obj_classes.map { |c| [ c.type, ($vim.obj_functions c).sort] }.to_h
306
314
  :%ruby |-
307
315
  ```
308
316
 
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`.
317
+ Deprecated functions will be hidden unless you set the environment variable
318
+ `NVIM_RUBY_STRICT=off`. Old functions not starting with `nvim_` will be hidden.
319
+ The full list of API functions can be obtained by a call to `get_api_info`.
312
320
 
313
321
  ```
314
322
  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.0",
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: "40737d0"
@@ -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,10 +155,10 @@ 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
161
+ unless $result == false or (not $result and r.nil?) then
163
162
  script_binding.local_variable_set :_, r
164
163
  puts "#=> #{r.inspect}"
165
164
  end
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.0
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: 2025-04-08 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  email: software@bertram-scharpf.de
13
13
  executables: