summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 47a628b)
raw | patch | inline | side by side (parent: 47a628b)
author | Jonas Fonseca <fonseca@diku.dk> | |
Tue, 10 Feb 2009 11:06:35 +0000 (12:06 +0100) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Tue, 10 Feb 2009 11:07:15 +0000 (12:07 +0100) |
Also, wait showing update progress until 5% has been reached.
NEWS | patch | blob | history | |
tig.c | patch | blob | history |
index f9b2e7f912328e2aa10846fba327226636416423..7927c21bae0e1744d7d013d0ba4b8252a2ab35d1 100644 (file)
--- a/NEWS
+++ b/NEWS
Bug fixes:
- Status view: show error when failing to open a file.
+ - Status view: report failures to update a file.
- Blame view: fix problem with uninitialized variable.
- Blame view: use line number information when loading blame for
specific commit.
index d2a9fe8b5c8ccb0d894896e130f80f92acea48d1..8b8d593122b1d813f056ed5a5079a1c9b9078038 100644 (file)
--- a/tig.c
+++ b/tig.c
return FALSE;
result = status_update_write(&io, status, type);
- done_io(&io);
- return result;
+ return done_io(&io) && result;
}
static bool
status_update_files(struct view *view, struct line *line)
{
+ char buf[sizeof(view->ref)];
struct io io = {};
bool result = TRUE;
struct line *pos = view->line + view->lines;
for (pos = line; pos < view->line + view->lines && pos->data; pos++)
files++;
- for (file = 0, done = 0; result && file < files; line++, file++) {
+ string_copy(buf, view->ref);
+ for (file = 0, done = 5; result && file < files; line++, file++) {
int almost_done = file * 100 / files;
if (almost_done > done) {
string_format(view->ref, "updating file %u of %u (%d%% done)",
file, files, done);
update_view_title(view);
+ doupdate();
}
result = status_update_write(&io, line->data, line->type);
}
+ string_copy(view->ref, buf);
- done_io(&io);
- return result;
+ return done_io(&io) && result;
}
static bool