summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/commit.tcl2
-rw-r--r--lib/console.tcl2
-rw-r--r--lib/status_bar.tcl5
3 files changed, 6 insertions, 3 deletions
diff --git a/lib/commit.tcl b/lib/commit.tcl
index 7099f5c6f7..10b0430f54 100644
--- a/lib/commit.tcl
+++ b/lib/commit.tcl
@@ -253,7 +253,7 @@ proc commit_committree {fd_wt curHEAD msg} {
global repo_config
gets $fd_wt tree_id
- if {$tree_id eq {} || [catch {close $fd_wt} err]} {
+ if {[catch {close $fd_wt} err]} {
error_popup [strcat [mc "write-tree failed:"] "\n\n$err"]
ui_status {Commit failed.}
unlock_index
diff --git a/lib/console.tcl b/lib/console.tcl
index 2075374683..5597188d80 100644
--- a/lib/console.tcl
+++ b/lib/console.tcl
@@ -120,7 +120,7 @@ method _read {fd after} {
} else {
$w_t delete $console_cr end
$w_t insert end "\n"
- $w_t insert end [string range $buf $c $cr]
+ $w_t insert end [string range $buf $c [expr {$cr - 1}]]
set c $cr
incr c
}
diff --git a/lib/status_bar.tcl b/lib/status_bar.tcl
index 5c5bf7c731..51d4177551 100644
--- a/lib/status_bar.tcl
+++ b/lib/status_bar.tcl
@@ -97,7 +97,10 @@ method update_meter {buf} {
set prior [string range $meter 0 $r]
set meter [string range $meter [expr {$r + 1}] end]
- if {[regexp "\\((\\d+)/(\\d+)\\)\\s+done\r\$" $prior _j a b]} {
+ set p "\\((\\d+)/(\\d+)\\)"
+ if {[regexp ":\\s*\\d+% $p\(?:, done.\\s*\n|\\s*\r)\$" $prior _j a b]} {
+ update $this $a $b
+ } elseif {[regexp "$p\\s+done\r\$" $prior _j a b]} {
update $this $a $b
}
}