Skip to content

Commit

Permalink
Keep the cursor fixed while initial stage progress is reported
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas committed Feb 15, 2009
1 parent 366fede commit 6f337ae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tig.c
Expand Up @@ -5120,6 +5120,7 @@ status_update_files(struct view *view, struct line *line)
struct line *pos = view->line + view->lines;
int files = 0;
int file, done;
int cursor_y, cursor_x;

if (!status_update_prepare(&io, line->type))
return FALSE;
Expand All @@ -5128,6 +5129,7 @@ status_update_files(struct view *view, struct line *line)
files++;

string_copy(buf, view->ref);
getsyx(cursor_y, cursor_x);
for (file = 0, done = 5; result && file < files; line++, file++) {
int almost_done = file * 100 / files;

Expand All @@ -5136,6 +5138,7 @@ status_update_files(struct view *view, struct line *line)
string_format(view->ref, "updating file %u of %u (%d%% done)",
file, files, done);
update_view_title(view);
setsyx(cursor_y, cursor_x);
doupdate();
}
result = status_update_write(&io, line->data, line->type);
Expand Down

0 comments on commit 6f337ae

Please sign in to comment.