We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 434dbf4 commit 6b6f2d9Copy full SHA for 6b6f2d9
rio/src/screen/context.rs
@@ -347,12 +347,16 @@ impl<T: EventListener + Clone + std::marker::Send + 'static> ContextManager<T> {
347
348
#[inline]
349
pub fn kill_current_context(&mut self) {
350
+ if self.contexts.len() <= 1 {
351
+ self.current_index = 0;
352
+ return;
353
+ }
354
+
355
let index_to_remove = self.current_index;
356
357
#[cfg(not(target_os = "windows"))]
358
{
359
let pid = self.contexts[index_to_remove].shell_pid;
- println!("closing pid {}", pid);
360
if pid > 0 {
361
teletypewriter::kill_pid(pid as i32);
362
}
0 commit comments