aboutsummaryrefslogtreecommitdiff
path: root/git-gui/lib
diff options
context:
space:
mode:
authorChris Idema <github_chris_idema@proton.me>2026-01-29 11:09:04 +0000
committerJohannes Sixt <j6t@kdbg.org>2026-01-29 22:34:53 +0100
commitd5139f34cec36864be90a7add024f1156af31c0f (patch)
treef8840361a238d52da41a943eb82e810e24147b78 /git-gui/lib
parent1a729ccb930f3c3e206117aeb4f536c9864e09c9 (diff)
downloadgit-d5139f34cec36864be90a7add024f1156af31c0f.tar.xz
git-gui: shift tabstops to account for the first column of patch text
When reviewing a change before staging, it is desirable to see text after tabstops aligned the same way as in the text editor. However, since there is always an additional character in column one in patch text ('+', '-', or space), the alignment is broken if text before the first tab character is just long enough to push the stop to the next tab position. Commit a43c5f51a4b1 (git-gui: add configurable tab size to the diff view, 2012-02-12) added infrastructure that manipulates the tabstop positions of the Tk text widget. However, it does so only when a 3-way diff is shown and only so that it takes into account the one additional markup at the beginning of lines. This only achieved that alignment does not get worse for 3-way diffs compared to regular patch text, but left misaligned text in regular patch text unmodified. Use and modify this infrastructure to shift tabstops by one position for regular patch text and two positions for 3-way diffs. Existing code already resets the tabstops to an unshifted position when contents of untracked files are displayed. Signed-off-by: Chris Idema <github_chris_idema@proton.me> [j6t: extend commit message] Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Diffstat (limited to 'git-gui/lib')
0 files changed, 0 insertions, 0 deletions