mirror of
https://github.com/veeso/termscp.git
synced 2026-09-25 21:41:20 -07:00
fix: don't clear screen after terminating termscp
This commit is contained in:
@@ -44,6 +44,7 @@ Released on
|
|||||||
- [Issue 268](https://github.com/veeso/termscp/issues/268): Pods and container explorer for Kube protocol.
|
- [Issue 268](https://github.com/veeso/termscp/issues/268): Pods and container explorer for Kube protocol.
|
||||||
- BREAKING ‼️ Kube address argument has changed; see manual!
|
- BREAKING ‼️ Kube address argument has changed; see manual!
|
||||||
- Pod and container argumets have been removed; from now on you will connect with the following syntax to the provided namespace: `/pod-name/container-name/path/to/file`
|
- Pod and container argumets have been removed; from now on you will connect with the following syntax to the provided namespace: `/pod-name/container-name/path/to/file`
|
||||||
|
- [Issue 279](https://github.com/veeso/termscp/issues/279): do not clear screen
|
||||||
|
|
||||||
## 0.14.0
|
## 0.14.0
|
||||||
|
|
||||||
|
|||||||
+8
-3
@@ -30,7 +30,7 @@ impl Context {
|
|||||||
theme_provider: ThemeProvider,
|
theme_provider: ThemeProvider,
|
||||||
error: Option<String>,
|
error: Option<String>,
|
||||||
) -> Context {
|
) -> Context {
|
||||||
Context {
|
let mut ctx = Context {
|
||||||
bookmarks_client,
|
bookmarks_client,
|
||||||
config_client,
|
config_client,
|
||||||
ft_params: None,
|
ft_params: None,
|
||||||
@@ -38,7 +38,13 @@ impl Context {
|
|||||||
terminal: TerminalBridge::new().expect("Could not initialize terminal"),
|
terminal: TerminalBridge::new().expect("Could not initialize terminal"),
|
||||||
theme_provider,
|
theme_provider,
|
||||||
error,
|
error,
|
||||||
}
|
};
|
||||||
|
|
||||||
|
// Init terminal state
|
||||||
|
let _ = ctx.terminal.enable_raw_mode();
|
||||||
|
let _ = ctx.terminal.enter_alternate_screen();
|
||||||
|
|
||||||
|
ctx
|
||||||
}
|
}
|
||||||
|
|
||||||
// -- getters
|
// -- getters
|
||||||
@@ -107,6 +113,5 @@ impl Drop for Context {
|
|||||||
// Re-enable terminal stuff
|
// Re-enable terminal stuff
|
||||||
let _ = self.terminal.disable_raw_mode();
|
let _ = self.terminal.disable_raw_mode();
|
||||||
let _ = self.terminal.leave_alternate_screen();
|
let _ = self.terminal.leave_alternate_screen();
|
||||||
let _ = self.terminal.clear_screen();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user