File tree 1 file changed +9
-10
lines changed
1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ function M.show(mode)
57
57
border = Config .options .ui .border ,
58
58
width = math.min (vim .o .columns - hpad * 2 , 200 ),
59
59
height = math.min (vim .o .lines - vpad * 2 , 70 ),
60
+ noautocmd = true ,
60
61
}
61
62
opts .row = (vim .o .lines - opts .height ) / 2
62
63
opts .col = (vim .o .columns - opts .width ) / 2
@@ -75,16 +76,14 @@ function M.show(mode)
75
76
local function close ()
76
77
M ._buf = nil
77
78
vim .diagnostic .reset (Config .ns , buf )
78
-
79
- if vim .api .nvim_buf_is_valid (buf ) then
80
- vim .api .nvim_buf_delete (buf , {
81
- force = true ,
82
- })
83
- end
84
-
85
- if vim .api .nvim_win_is_valid (win ) then
86
- vim .api .nvim_win_close (win , true )
87
- end
79
+ vim .schedule (function ()
80
+ if vim .api .nvim_buf_is_valid (buf ) then
81
+ vim .api .nvim_buf_delete (buf , { force = true })
82
+ end
83
+ if vim .api .nvim_win_is_valid (win ) then
84
+ vim .api .nvim_win_close (win , true )
85
+ end
86
+ end )
88
87
end
89
88
90
89
vim .keymap .set (" n" , " q" , close , {
You can’t perform that action at this time.
0 commit comments