From 6f337aee3a4cdf21bce3661171a9ee36cbd7d689 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Sun, 15 Feb 2009 23:20:46 +0100 Subject: [PATCH] Keep the cursor fixed while initial stage progress is reported --- tig.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tig.c b/tig.c index b9d7a63..458ebcb 100644 --- a/tig.c +++ b/tig.c @@ -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; @@ -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; @@ -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); -- 2.32.0.93.g670b81a890