mirror of
https://github.com/sharkdp/bat.git
synced 2026-10-30 10:06:12 +00:00
1 parent
9bf344f760
commit
ad608014d9
3 files changed
+17
-1
No files matched your search
@@ -1,5 +1,7 @@
|
|||||||
# unreleased
|
# unreleased
|
||||||
|
|
||||||
|
- Fixed bug caused by using `--plain` and `--terminal-width=N` flags simultaneously, see #3529 (@H4k1l)
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- Improve native man pages and command help syntax highlighting by stripping overstriking, see #3517 (@akirk)
|
- Improve native man pages and command help syntax highlighting by stripping overstriking, see #3517 (@akirk)
|
||||||
|
|||||||
+1
-1
@@ -405,7 +405,7 @@ impl App {
|
|||||||
Some("character") => WrappingMode::Character,
|
Some("character") => WrappingMode::Character,
|
||||||
Some("never") => WrappingMode::NoWrapping(true),
|
Some("never") => WrappingMode::NoWrapping(true),
|
||||||
Some("auto") | None => {
|
Some("auto") | None => {
|
||||||
if style_components.plain() {
|
if style_components.plain() && maybe_term_width.is_none() {
|
||||||
WrappingMode::NoWrapping(false)
|
WrappingMode::NoWrapping(false)
|
||||||
} else {
|
} else {
|
||||||
WrappingMode::Character
|
WrappingMode::Character
|
||||||
|
|||||||
@@ -3631,3 +3631,17 @@ fn style_components_will_merge_with_env_var() {
|
|||||||
.stdout(" STDIN\n 1 test\n")
|
.stdout(" STDIN\n 1 test\n")
|
||||||
.stderr("");
|
.stderr("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Test for https://github.com/sharkdp/bat/issues/3526
|
||||||
|
#[test]
|
||||||
|
fn plain_with_sized_terminal_width() {
|
||||||
|
bat()
|
||||||
|
.arg("--plain")
|
||||||
|
.arg("--terminal-width=6")
|
||||||
|
.arg("--decorations=always")
|
||||||
|
.arg("test.txt")
|
||||||
|
.assert()
|
||||||
|
.success()
|
||||||
|
.stdout("hello \nworld\n")
|
||||||
|
.stderr("");
|
||||||
|
}
|
||||||
Reference in new issue
Block a user