File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 1515local M = {}
1616
1717local executable = Util .get_sf_executable ()
18- local active_file_path = nil
18+ local active_file_path
1919
2020local function push_to_org_callback (j )
2121 vim .schedule (function ()
@@ -70,7 +70,7 @@ local function push_to_org_callback(j)
7070 end
7171 end
7272 if # diagnostics > 0 then
73- Util .set_error_diagnostics (diagnostics )
73+ Util .set_error_diagnostics (diagnostics , M . current_bufnr )
7474 vim .notify (
7575 string.format (
7676 " Error(s) while pushing %s. Check diagnostics. Overlapping messages from apex_ls have been omitted." ,
@@ -180,6 +180,7 @@ local function push(command)
180180
181181 if not M .current_job or not M .current_job :is_running () then
182182 M .current_job = new_job
183+ M .current_bufnr = vim .api .nvim_get_current_buf ()
183184 M .current_job :start ()
184185 else
185186 Util .notify_command_in_progress (" push/pull" )
@@ -206,6 +207,7 @@ local function pull(command)
206207
207208 if not M .current_job or not M .current_job :is_running () then
208209 M .current_job = new_job
210+ M .current_bufnr = vim .api .nvim_get_current_buf ()
209211 M .current_job :start ()
210212 else
211213 Util .notify_command_in_progress (" push/pull" )
Original file line number Diff line number Diff line change @@ -131,9 +131,8 @@ local function get_apex_ls_namespace()
131131 end
132132end
133133
134- function M .set_error_diagnostics (diagnostics )
134+ function M .set_error_diagnostics (diagnostics , bufnr )
135135 local apex_ls_namespace = get_apex_ls_namespace ()
136- local bufnr = vim .api .nvim_get_current_buf ()
137136 -- filter out overlapping diagnostics from apex_ls
138137 local filtered_diagnostics = {}
139138 for _ , diagnostic in ipairs (diagnostics ) do
You can’t perform that action at this time.
0 commit comments