on master help sign in
Revert "Pass '--mouse' to less versions >= 551"
ce583ebsharkdp
CHANGELOG.md−2
@@ -6,8 +6,6 @@
6 in the header. This is useful when piping input into `bat`. See #654 and #892 (@neuronull).
6 in the header. This is useful when piping input into `bat`. See #654 and #892 (@neuronull).
7- Added a new `--generate-config-file` option to creat an initial configuration file
7- Added a new `--generate-config-file` option to creat an initial configuration file
8 at the right place. See #870 (@jmick414)
8 at the right place. See #870 (@jmick414)
9−- When using `less` version 551 or newer, `bat` will now pass the `--mouse` argument, allowing
10− for (better) mouse scrolling support in some terminals, see #904
11
9
12## Bugfixes
10## Bugfixes
13
11
src/output.rs+1−13
@@ -82,13 +82,11 @@ impl OutputType {
82 p.arg("--quit-if-one-screen");
82 p.arg("--quit-if-one-screen");
83 }
83 }
84
84
85− let less_version = retrieve_less_version();
86−
87 // Passing '--no-init' fixes a bug with '--quit-if-one-screen' in older
85 // Passing '--no-init' fixes a bug with '--quit-if-one-screen' in older
88 // versions of 'less'. Unfortunately, it also breaks mouse-wheel support.
86 // versions of 'less'. Unfortunately, it also breaks mouse-wheel support.
89 //
87 //
90 // See: http://www.greenwoodsoftware.com/less/news.530.html
88 // See: http://www.greenwoodsoftware.com/less/news.530.html
91− match less_version {
89+ match retrieve_less_version() {
92 None => {
90 None => {
93 p.arg("--no-init");
91 p.arg("--no-init");
94 }
92 }
@@ -97,16 +95,6 @@ impl OutputType {
97 }
95 }
98 _ => {}
96 _ => {}
99 }
97 }
100−
101− // Passing '--mouse' allows mouse scrolling in terminals which do not
102− // support "fake scrolling", see https://github.com/sharkdp/bat/issues/904
103− // The '--mouse' argument is only supported in less 551 or higher.
104− match less_version {
105− Some(version) if version >= 551 => {
106− p.arg("--mouse");
107− }
108− _ => {}
109− }
110 } else {
98 } else {
111 p.args(args);
99 p.args(args);
112 }
100 }