1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-11-01 07:32:01 +00:00

Only leave space for git diff markers if any line is modified (#3406)

Previously, setting `--style=changes` would always print a 2-space
indent, even if the file was unmodified. This changes the style to only
print an indent if there is at least one +/- git marker in the sidebar.
This commit is contained in:
jyn
2025-09-21 22:42:56 -07:00
committed by GitHub
parent 9d003dd1b9
commit c8b8132228
3 changed files with 35 additions and 17 deletions

View File

@@ -20,6 +20,7 @@
- Send all bat errors to stderr by default, see #3336 (@JerryImMouse)
- Make --map-syntax target case insensitive to match --language, see #3206 (@keith-hall)
- Correctly determine the end of the line in UTF16LE/BE input #3369 (@keith-hall)
- `--style=changes` no longer prints a two-space indent when the file is unmodified, see issue #2710 and PR #3406 (@jyn514)
## Other