on master help sign in
Revert "Pass '--mouse' to less versions >= 551"

This reverts commit cb21b74ecd5fe971d356677932bcbf892b1dc088.

commitce583eb9bfd60e7fcccd964d03298353cd6d62c7 authorsharkdp <davidpeter@web.de> dateTue 21 Apr 2020, 17:29 (7 years ago) parent3a195be
2 files changed+1−15
CHANGELOG.md−2 src/output.rs+1−13
CHANGELOG.md−2
@@ -6,8 +6,6 @@
66 in the header. This is useful when piping input into `bat`. See #654 and #892 (@neuronull).
77- Added a new `--generate-config-file` option to creat an initial configuration file
88 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
119
1210## Bugfixes
1311
src/output.rs+1−13
@@ -82,13 +82,11 @@ impl OutputType {
8282 p.arg("--quit-if-one-screen");
8383 }
8484
85− let less_version = retrieve_less_version();
86−
8785 // Passing '--no-init' fixes a bug with '--quit-if-one-screen' in older
8886 // versions of 'less'. Unfortunately, it also breaks mouse-wheel support.
8987 //
9088 // See: http://www.greenwoodsoftware.com/less/news.530.html
91− match less_version {
89+ match retrieve_less_version() {
9290 None => {
9391 p.arg("--no-init");
9492 }
@@ -97,16 +95,6 @@ impl OutputType {
9795 }
9896 _ => {}
9997 }
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− }
11098 } else {
11199 p.args(args);
112100 }