+19
-0
lines changedFilter options
+19
-0
lines changed Original file line number Diff line number Diff line change
@@ -285,6 +285,25 @@ end]]
285
285
eq(true, result)
286
286
end)
287
287
288
+
it('support getting empty text if node range is zero width', function()
289
+
local text = [[
290
+
```lua
291
+
{}
292
+
```]]
293
+
insert(text)
294
+
local result = exec_lua([[
295
+
local fake_node = {}
296
+
function fake_node:start()
297
+
return 1, 0, 7
298
+
end
299
+
function fake_node:end_()
300
+
return 1, 0, 7
301
+
end
302
+
return vim.treesitter.get_node_text(fake_node, 0) == ''
303
+
]])
304
+
eq(true, result)
305
+
end)
306
+
288
307
it('can match special regex characters like \\ * + ( with `vim-match?`', function()
289
308
insert('char* astring = "\\n"; (1 + 1) * 2 != 2;')
290
309
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4