mirror of
https://github.com/veeso/termscp.git
synced 2026-04-14 14:11:22 -07:00
ConfigClient is an option no more; config client degraded mode
This commit is contained in:
@@ -103,10 +103,7 @@ impl FileTransferActivity {
|
||||
///
|
||||
/// Set text editor to use
|
||||
pub(super) fn setup_text_editor(&self) {
|
||||
if let Some(config_cli) = self.context.as_ref().unwrap().config_client.as_ref() {
|
||||
// Set text editor
|
||||
env::set_var("EDITOR", config_cli.get_text_editor());
|
||||
}
|
||||
env::set_var("EDITOR", self.config().get_text_editor());
|
||||
}
|
||||
|
||||
/// ### read_input_event
|
||||
|
||||
@@ -210,6 +210,13 @@ impl FileTransferActivity {
|
||||
})
|
||||
}
|
||||
|
||||
/// ### config
|
||||
///
|
||||
/// Returns config client reference
|
||||
fn config(&self) -> &ConfigClient {
|
||||
&self.context.as_ref().unwrap().config_client
|
||||
}
|
||||
|
||||
/// ### theme
|
||||
///
|
||||
/// Get a reference to `Theme`
|
||||
@@ -249,7 +256,7 @@ impl Activity for FileTransferActivity {
|
||||
self.init();
|
||||
debug!("Initialized view");
|
||||
// Verify error state from context
|
||||
if let Some(err) = self.context.as_mut().unwrap().get_error() {
|
||||
if let Some(err) = self.context.as_mut().unwrap().error() {
|
||||
error!("Fatal error on create: {}", err);
|
||||
self.mount_fatal(&err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user