editor: Render diagnostic popover even if the source is out of view (#41449)
This happens quite often with cargo based diagnostics which may spawn several lines (sometimes the entire screen), forcing the user to scroll up to the start of the diagnostic just to see the hover message is not great. Release Notes: - Fixed diagnostics hovers not working if the diagnostic spans out of view
This commit is contained in:
@@ -281,7 +281,8 @@ impl BackgroundExecutor {
|
||||
});
|
||||
let mut cx = std::task::Context::from_waker(&waker);
|
||||
|
||||
let mut test_should_end_by = Instant::now() + Duration::from_secs(500);
|
||||
let duration = Duration::from_secs(500);
|
||||
let mut test_should_end_by = Instant::now() + duration;
|
||||
|
||||
loop {
|
||||
match future.as_mut().poll(&mut cx) {
|
||||
@@ -319,7 +320,7 @@ impl BackgroundExecutor {
|
||||
test_should_end_by.saturating_duration_since(Instant::now()),
|
||||
);
|
||||
if Instant::now() > test_should_end_by {
|
||||
panic!("test timed out with allow_parking")
|
||||
panic!("test timed out after {duration:?} with allow_parking")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user