mirror of
https://github.com/lotabout/skim.git
synced 2026-09-10 07:16:23 -04:00
chore: minor reliability corrections
This commit is contained in:
parent
106f9f883a
commit
0029c31fbe
|
|
@ -599,7 +599,7 @@ impl App {
|
|||
u16::try_from(u32::from(self.preview.cols) * u32::from(p) / 100).unwrap_or(u16::MAX)
|
||||
}
|
||||
};
|
||||
self.preview.scroll_x = usize::from(h_scroll.saturating_add(h_offset));
|
||||
self.preview.scroll_x = usize::from(h_scroll).saturating_add(usize::from(h_offset));
|
||||
}
|
||||
ItemPreview::TextWithPos(t, preview_position) | ItemPreview::AnsiWithPos(t, preview_position) => self
|
||||
.preview
|
||||
|
|
|
|||
|
|
@ -602,8 +602,11 @@ impl Preview {
|
|||
terminate_plain_child(&child);
|
||||
let stdout = stdout_reader.join().unwrap_or_default();
|
||||
let stderr = stderr_reader.join().unwrap_or_default();
|
||||
if let Ok(mut guard) = child.lock() {
|
||||
guard.take();
|
||||
if let Ok(mut guard) = child.lock()
|
||||
&& let Some(mut child) = guard.take()
|
||||
&& status.is_none()
|
||||
{
|
||||
let _ = child.wait();
|
||||
}
|
||||
|
||||
let Some(status) = status else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue