Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix --tabs=0 in side-by-side mode #751

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dhduvall
Copy link

Search for tabs in the input, keeping track of how wide the text before it is, so that we can compute the width of the tab as the number of cells necessary to get to the next tabstop, letting us start the plus side at a consistent column.

Tabstops are hard-coded at 8 because getting the information from the terminal is non-trivial, and it should be extremely rare that it would be set to anything else.

Fixes #750.

@dandavison
Copy link
Owner

Hi @dhduvall, thanks very much for this PR, and #750 and #752! I am a bit busy this week and next so I might be slower than usual in responding to them properly; apologies if that proves to be so.

cc also @th1000s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 In side-by-side mode, tabs mess up alignment of plus side
2 participants