File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ local pl = lazy.access(utils, "path") ---@type PathLib
1515local api = vim .api
1616local M = {}
1717
18+ local HAS_NVIM_0_10 = vim .fn .has (" nvim-0.10" ) == 1
19+
1820--- @alias git.FileDataProducer fun ( kind : vcs.FileKind , path : string , pos : " left" | " right" ): string[]
1921
2022--- @class CustomFolds
@@ -355,7 +357,11 @@ function File:attach_buffer(force, opt)
355357
356358 -- Diagnostics
357359 if state .disable_diagnostics then
358- vim .diagnostic .disable (self .bufnr )
360+ if HAS_NVIM_0_10 then
361+ vim .diagnostic .enable (false , { bufnr = self .bufnr })
362+ else
363+ vim .diagnostic .disable (self .bufnr )
364+ end
359365 end
360366
361367 File .attached [self .bufnr ] = state
@@ -382,7 +388,11 @@ function File:detach_buffer()
382388
383389 -- Diagnostics
384390 if state .disable_diagnostics then
385- vim .diagnostic .enable (self .bufnr )
391+ if HAS_NVIM_0_10 then
392+ vim .diagnostic .enable (true , { bufnr = self .bufnr })
393+ else
394+ vim .diagnostic .enable (self .bufnr )
395+ end
386396 end
387397
388398 File .attached [self .bufnr ] = nil
You can’t perform that action at this time.
0 commit comments