bat icon indicating copy to clipboard operation
bat copied to clipboard

preserve hard tabs

Open mcandre opened this issue 2 months ago • 1 comments

Hi,

Every pager I've tried corrupts hard tabs to spaces.

This happens with more, less, ov, and bat.

It ends up breaking common copy & paste workflows for indentation sensitive languages, including Go and make.

I tried --tabs 0 -p. At first glance, the rendering looks okay. However, when I select the bat paginated source code snippsets in my Terminal.app console, then the output characters turn out to be corrupted into individual spaces.

mcandre avatar Oct 29 '25 21:10 mcandre

Update:

When I apply the flags --tabs 0 -p --pager=builtin, then the behavior is even worse. Now, I get no feedback at all about which text characters are selected for copying to the clipboard.

These problems happen with the latest stable bat release from Homebrew, on macOS Sequoia.

mcandre avatar Oct 29 '25 21:10 mcandre