summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsharkdp <davidpeter@web.de>2020-04-21 17:29:01 +0200
committersharkdp <davidpeter@web.de>2020-04-21 17:29:01 +0200
commitce583eb9bfd60e7fcccd964d03298353cd6d62c7 (patch)
tree89ae55e3a0c0b0c4ac52e6a8b8608f28114024ed
parent3a195be14e59ddf1c70fa672b530b91ded70c39f (diff)
Revert "Pass '--mouse' to less versions >= 551"
-rw-r--r--CHANGELOG.md2
-rw-r--r--src/output.rs14
2 files changed, 1 insertions, 15 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0102437f..83f2bfb9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,8 +6,6 @@
in the header. This is useful when piping input into `bat`. See #654 and #892 (@neuronull).
- Added a new `--generate-config-file` option to creat an initial configuration file
at the right place. See #870 (@jmick414)
-- When using `less` version 551 or newer, `bat` will now pass the `--mouse` argument, allowing
- for (better) mouse scrolling support in some terminals, see #904
## Bugfixes
diff --git a/src/output.rs b/src/output.rs
index c8c44fbb..15f29e43 100644
--- a/src/output.rs
+++ b/src/output.rs
@@ -82,13 +82,11 @@ impl OutputType {
p.arg("--quit-if-one-screen");
}
- let less_version = retrieve_less_version();
-
// Passing '--no-init' fixes a bug with '--quit-if-one-screen' in older
// versions of 'less'. Unfortunately, it also breaks mouse-wheel support.
//
// See: http://www.greenwoodsoftware.com/less/news.530.html
- match less_version {
+ match retrieve_less_version() {
None => {
p.arg("--no-init");
}
@@ -97,16 +95,6 @@ impl OutputType {
}
_ => {}
}
-
- // Passing '--mouse' allows mouse scrolling in terminals which do not
- // support "fake scrolling", see https://github.com/sharkdp/bat/issues/904
- // The '--mouse' argument is only supported in less 551 or higher.
- match less_version {
- Some(version) if version >= 551 => {
- p.arg("--mouse");
- }
- _ => {}
- }
} else {
p.args(args);
}