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

git-gui: compensate the additional diff marker at line start #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/diff.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ proc apply_tab_size {{firsttab {}}} {

set w [font measure font_diff "0"]
if {$have_tk85 && $firsttab != 0} {
$ui_diff configure -tabs [list [expr {$firsttab * $w}] [expr {($firsttab + $repo_config(gui.tabsize)) * $w}]]
$ui_diff configure -tabs [list [expr {($firsttab + $repo_config(gui.tabsize)) * $w}] [expr {($firsttab + 2*$repo_config(gui.tabsize)) * $w}]]
} elseif {$have_tk85 || $repo_config(gui.tabsize) != 8} {
$ui_diff configure -tabs [expr {$repo_config(gui.tabsize) * $w}]
} else {
Expand Down Expand Up @@ -118,7 +118,7 @@ proc show_diff {path w {lno {}} {scroll_pos {}} {callback {}}} {

set cont_info [list $scroll_pos $callback]

apply_tab_size 0
apply_tab_size 1

if {[string first {U} $m] >= 0} {
merge_load_stages $path [list show_unmerged_diff $cont_info]
Expand Down Expand Up @@ -420,7 +420,7 @@ proc read_diff {fd conflict_size cont_info} {
#
if {[string match {@@@ *} $line]} {
set is_3way_diff 1
apply_tab_size 1
apply_tab_size 2
}

if {$::current_diff_inheader} {
Expand Down