on master help sign in
Revert "Only enable --mouse when running from tmux, see #904"
3a195besharkdp
src/output.rs+5−9
@@ -100,16 +100,12 @@ impl OutputType {
100
100
101 // Passing '--mouse' allows mouse scrolling in terminals which do not
101 // Passing '--mouse' allows mouse scrolling in terminals which do not
102 // support "fake scrolling", see https://github.com/sharkdp/bat/issues/904
102 // support "fake scrolling", see https://github.com/sharkdp/bat/issues/904
103− // The '--mouse' argument is only supported in less 551 or higher. We do
103+ // The '--mouse' argument is only supported in less 551 or higher.
104− // not enable this option everywhere because it prevents users from
105− // drag-selecting text without pressing shift.
106− if env::var_os("TMUX").is_some() {
107− match less_version {
104+ match less_version {
108− Some(version) if version >= 551 => {
105+ Some(version) if version >= 551 => {
109− p.arg("--mouse");
106+ p.arg("--mouse");
110− }
111− _ => {}
112 }
107 }
108+ _ => {}
113 }
109 }
114 } else {
110 } else {
115 p.args(args);
111 p.args(args);