Skip to content

Commit 961a628

Browse files
committed
Merge branch 'maint'
* maint: git-gui: Fix string escaping in po2msg.sh git gui: show diffs with a minimum of 1 context line Conflicts: lib/option.tcl
2 parents f7078b4 + 9dc3793 commit 961a628

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

git-gui.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1947,7 +1947,7 @@ proc show_more_context {} {
19471947
19481948
proc show_less_context {} {
19491949
global repo_config
1950-
if {$repo_config(gui.diffcontext) >= 1} {
1950+
if {$repo_config(gui.diffcontext) > 1} {
19511951
incr repo_config(gui.diffcontext) -1
19521952
reshow_diff
19531953
}

lib/diff.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ proc show_diff {path w {lno {}} {scroll_pos {}}} {
175175

176176
lappend cmd -p
177177
lappend cmd --no-color
178-
if {$repo_config(gui.diffcontext) >= 0} {
178+
if {$repo_config(gui.diffcontext) >= 1} {
179179
lappend cmd "-U$repo_config(gui.diffcontext)"
180180
}
181181
if {$w eq $ui_index} {

lib/option.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ proc do_options {} {
126126
{b gui.fastcopyblame {mc "Blame Copy Only On Changed Files"}}
127127
{i-20..200 gui.copyblamethreshold {mc "Minimum Letters To Blame Copy On"}}
128128
{i-0..300 gui.blamehistoryctx {mc "Blame History Context Radius (days)"}}
129-
{i-0..99 gui.diffcontext {mc "Number of Diff Context Lines"}}
129+
{i-1..99 gui.diffcontext {mc "Number of Diff Context Lines"}}
130130
{i-0..99 gui.commitmsgwidth {mc "Commit Message Text Width"}}
131131
{t gui.newbranchtemplate {mc "New Branch Name Template"}}
132132
} {

po/po2msg.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ proc u2a {s} {
1111
foreach i [split $s ""] {
1212
scan $i %c c
1313
if {$c<128} {
14-
# escape '[', '\' and ']'
15-
if {$c == 0x5b || $c == 0x5d} {
14+
# escape '[', '\', '$' and ']'
15+
if {$c == 0x5b || $c == 0x5d || $c == 0x24} {
1616
append res "\\"
1717
}
1818
append res $i

0 commit comments

Comments
 (0)