summaryrefslogtreecommitdiffstats
path: root/src/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/bulk_rename.rs2
-rw-r--r--src/commands/custom_search.rs2
-rw-r--r--src/commands/fzf.rs15
-rw-r--r--src/commands/open_file.rs6
-rw-r--r--src/commands/sub_process.rs2
-rw-r--r--src/commands/zoxide.rs2
6 files changed, 17 insertions, 12 deletions
diff --git a/src/commands/bulk_rename.rs b/src/commands/bulk_rename.rs
index f7009ae..9cc7f26 100644
--- a/src/commands/bulk_rename.rs
+++ b/src/commands/bulk_rename.rs
@@ -128,7 +128,7 @@ pub fn bulk_rename(context: &mut AppContext, backend: &mut AppBackend) -> AppRes
context.remove_external_preview();
backend.terminal_drop();
let res = _bulk_rename(context);
- backend.terminal_restore()?;
+ backend.terminal_restore(context.config_ref().mouse_support)?;
reload::soft_reload_curr_tab(context)?;
res
}
diff --git a/src/commands/custom_search.rs b/src/commands/custom_search.rs
index 422143e..a9d4405 100644
--- a/src/commands/custom_search.rs
+++ b/src/commands/custom_search.rs
@@ -57,7 +57,7 @@ pub fn custom_search(
.stdout(Stdio::piped())
.spawn()?
.wait_with_output()?;
- backend.terminal_restore()?;
+ backend.terminal_restore(context.config_ref().mouse_support)?;
cmd_result
} else {
cmd.output()?
diff --git a/src/commands/fzf.rs b/src/commands/fzf.rs
index 8aeaa1b..9c60c54 100644
--- a/src/commands/fzf.rs
+++ b/src/commands/fzf.rs
@@ -25,7 +25,7 @@ pub fn fzf(
CaseSensitivity::Smart => {}
}
- fzf_impl(backend, items, args)
+ fzf_impl(context, backend, items, args)
}
pub fn fzf_multi(
@@ -47,10 +47,15 @@ pub fn fzf_multi(
}
args.push("-m".to_owned());
- fzf_impl(backend, items, args)
+ fzf_impl(context, backend, items, args)
}
-fn fzf_impl(backend: &mut AppBackend, items: Vec<String>, args: Vec<String>) -> AppResult<String> {
+fn fzf_impl(
+ context: &mut AppContext,
+ backend: &mut AppBackend,
+ items: Vec<String>,
+ args: Vec<String>,
+) -> AppResult<String> {
backend.terminal_drop();
let mut cmd = Command::new("fzf");
@@ -63,7 +68,7 @@ fn fzf_impl(backend: &mut AppBackend, items: Vec<String>, args: Vec<String>) ->
let mut fzf = match cmd.spawn() {
Ok(child) => child,
Err(e) => {
- backend.terminal_restore()?;
+ backend.terminal_restore(context.config_ref().mouse_support)?;
return Err(AppError::from(e));
}
};
@@ -77,7 +82,7 @@ fn fzf_impl(backend: &mut AppBackend, items: Vec<String>, args: Vec<String>) ->
}
let fzf_output = fzf.wait_with_output();
- backend.terminal_restore()?;
+ backend.terminal_restore(context.config_ref().mouse_support)?;
if let Ok(output) = fzf_output {
if output.status.success() {
diff --git a/src/commands/open_file.rs b/src/commands/open_file.rs
index 0d248e9..d206f35 100644
--- a/src/commands/open_file.rs
+++ b/src/commands/open_file.rs
@@ -60,7 +60,7 @@ where
} else {
backend.terminal_drop();
let res = execute_and_wait(option, files);
- backend.terminal_restore()?;
+ backend.terminal_restore(context.config_ref().mouse_support)?;
res?;
}
Ok(())
@@ -79,7 +79,7 @@ fn _open_with_xdg(
backend.terminal_drop();
let handle = open::that_in_background(path);
let result = handle.join();
- backend.terminal_restore()?;
+ backend.terminal_restore(context.config_ref().mouse_support)?;
if let Ok(result) = result {
result?;
}
@@ -136,7 +136,7 @@ where
let mut option = ProgramEntry::new(String::from(cmd));
option.args(args_iter);
let res = execute_and_wait(&option, files);
- backend.terminal_restore()?;
+ backend.terminal_restore(context.config_ref().mouse_support)?;
res?
}
}
diff --git a/src/commands/sub_process.rs b/src/commands/sub_process.rs
index 437112e..58bfdc1 100644
--- a/src/commands/sub_process.rs
+++ b/src/commands/sub_process.rs
@@ -81,7 +81,7 @@ pub fn sub_process(
) -> AppResult {
backend.terminal_drop();
let res = execute_sub_process(context, words, spawn);
- backend.terminal_restore()?;
+ backend.terminal_restore(context.config_ref().mouse_support)?;
let _ = reload::soft_reload_curr_tab(context);
context.message_queue_mut().push_info(format!(
"{}: {}",
diff --git a/src/commands/zoxide.rs b/src/commands/zoxide.rs
index 222bb9d..a065117 100644
--- a/src/commands/zoxide.rs
+++ b/src/commands/zoxide.rs
@@ -49,7 +49,7 @@ pub fn zoxide_query_interactive(context: &mut AppContext, backend: &mut AppBacke
.spawn()?;
let zoxide_output = zoxide_process.wait_with_output()?;
- backend.terminal_restore()?;
+ backend.terminal_restore(context.config_ref().mouse_support)?;
if zoxide_output.status.success() {
if let Ok(zoxide_str) = std::str::from_utf8(&zoxide_output.stdout) {