fix: diagnostic float would not open if scope=cursor (#275)
This commit is contained in:
parent
c4cc8240f1
commit
a1af7a1b59
3 changed files with 9 additions and 1 deletions
|
|
@ -463,6 +463,7 @@ M.try_write_changes = function(confirm, cb)
|
|||
local was_modified = vim.bo.modified
|
||||
local buffers = view.get_all_buffers()
|
||||
local all_diffs = {}
|
||||
---@type table<integer, oil.ParseError[]>
|
||||
local all_errors = {}
|
||||
|
||||
mutation_in_progress = true
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ M.parse = function(bufnr)
|
|||
name = name:lower()
|
||||
end
|
||||
if seen_names[name] then
|
||||
table.insert(errors, { message = "Duplicate filename", lnum = i - 1, col = 0 })
|
||||
table.insert(errors, { message = "Duplicate filename", lnum = i - 1, end_lnum = i, col = 0 })
|
||||
else
|
||||
seen_names[name] = true
|
||||
end
|
||||
|
|
@ -200,6 +200,7 @@ M.parse = function(bufnr)
|
|||
table.insert(errors, {
|
||||
message = err,
|
||||
lnum = i - 1,
|
||||
end_lnum = i,
|
||||
col = 0,
|
||||
})
|
||||
goto continue
|
||||
|
|
@ -221,6 +222,7 @@ M.parse = function(bufnr)
|
|||
table.insert(errors, {
|
||||
message = message,
|
||||
lnum = i - 1,
|
||||
end_lnum = i,
|
||||
col = 0,
|
||||
})
|
||||
goto continue
|
||||
|
|
@ -273,6 +275,7 @@ M.parse = function(bufnr)
|
|||
table.insert(errors, {
|
||||
message = "Paths cannot start with '/'",
|
||||
lnum = i - 1,
|
||||
end_lnum = i,
|
||||
col = 0,
|
||||
})
|
||||
goto continue
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@ describe("parser", function()
|
|||
{
|
||||
message = "Malformed ID at start of line",
|
||||
lnum = 0,
|
||||
end_lnum = 1,
|
||||
col = 0,
|
||||
},
|
||||
}, errors)
|
||||
|
|
@ -126,6 +127,7 @@ describe("parser", function()
|
|||
{
|
||||
message = "No filename found",
|
||||
lnum = 0,
|
||||
end_lnum = 1,
|
||||
col = 0,
|
||||
},
|
||||
}, errors)
|
||||
|
|
@ -143,6 +145,7 @@ describe("parser", function()
|
|||
{
|
||||
message = "Duplicate filename",
|
||||
lnum = 1,
|
||||
end_lnum = 2,
|
||||
col = 0,
|
||||
},
|
||||
}, errors)
|
||||
|
|
@ -161,6 +164,7 @@ describe("parser", function()
|
|||
{
|
||||
message = "Duplicate filename",
|
||||
lnum = 1,
|
||||
end_lnum = 2,
|
||||
col = 0,
|
||||
},
|
||||
}, errors)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue