Always read textview input from stream (#3680)

This commit is contained in:
JT 2021-06-25 14:17:58 +12:00 committed by GitHub
parent 19c79f0a73
commit 6ba40773bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -63,7 +63,7 @@ pub fn view_text_value(value: &Value) {
.theme(&config.theme);
match value.anchor().and_then(get_file_path) {
Some(file_path) => printer.input_file(file_path),
Some(file_path) => printer.input(bat::Input::from_bytes(s.as_bytes()).name(file_path)),
None => printer.input_from_bytes(s.as_bytes()),
};