File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -443,6 +443,12 @@ function Infoview:__update()
443
443
pcall (info .move_pin , info , util .make_position_params ())
444
444
end
445
445
446
+ --- Directly mark that the infoview has died. What a shame.
447
+ function Infoview :died ()
448
+ self .info .pin .__data_element = components .LSP_HAS_DIED -- FIXME: yeah, gross
449
+ self .info .pin :__update ()
450
+ end
451
+
446
452
--- Either open or close a diff window for this infoview depending on whether its info has a diff pin.
447
453
function Infoview :__refresh_diff ()
448
454
if not self .window then
@@ -1259,7 +1265,7 @@ function infoview.enable(opts)
1259
1265
if not current_infoview then
1260
1266
return
1261
1267
end
1262
- current_infoview :__update ()
1268
+ current_infoview :died ()
1263
1269
end ),
1264
1270
})
1265
1271
Original file line number Diff line number Diff line change @@ -485,12 +485,7 @@ describe('interactive infoview', function()
485
485
return vim .tbl_isempty (vim .lsp .get_clients ())
486
486
end )
487
487
assert .message (" Couldn't kill the LSP!" ).is_true (succeeded )
488
-
489
- -- We don't immediately mark the infoview with our dead message.
490
- -- In theory maybe we could by attaching to `LspDetach` and triggering
491
- -- a final update, but for now this seems OK.
492
- helpers .move_cursor { to = { 1 , 6 } }
493
- assert .infoview_contents .are ' 🪦 The Lean language server is dead.'
488
+ assert .infoview_contents_nowait .are ' 🪦 The Lean language server is dead.'
494
489
end )
495
490
end )
496
491
)
You can’t perform that action at this time.
0 commit comments