mirror of
https://github.com/neovim/neovim.git
synced 2025-11-27 12:40:39 +00:00
gendeclarations: Handle case when text did not match
This commit is contained in:
@@ -208,7 +208,6 @@ while init ~= nil do
|
|||||||
local line, dir, file = text:match(filepattern, init)
|
local line, dir, file = text:match(filepattern, init)
|
||||||
if file ~= nil then
|
if file ~= nil then
|
||||||
curfile = file
|
curfile = file
|
||||||
end
|
|
||||||
declline = tonumber(line) - 1
|
declline = tonumber(line) - 1
|
||||||
local curdir_start = dir:find('src/nvim/')
|
local curdir_start = dir:find('src/nvim/')
|
||||||
if curdir_start ~= nil then
|
if curdir_start ~= nil then
|
||||||
@@ -216,6 +215,9 @@ while init ~= nil do
|
|||||||
else
|
else
|
||||||
curdir = dir
|
curdir = dir
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
declline = declline - 1
|
||||||
|
end
|
||||||
elseif init < declendpos then
|
elseif init < declendpos then
|
||||||
-- Skipping over declaration
|
-- Skipping over declaration
|
||||||
elseif curfile == neededfile then
|
elseif curfile == neededfile then
|
||||||
|
|||||||
Reference in New Issue
Block a user