index 148b6b60b1147c130ea7778745011f9cd4646daa..180661a4fcfbc94067a795898df1a6fc6a6e0330 100644 (file)
--- a/tig.c
+++ b/tig.c
while (spaces > 0) {
int len = MIN(spaces, sizeof(space) - 1);
- col += draw_chars(view, type, space, spaces, FALSE);
+ col += draw_chars(view, type, space, len, FALSE);
spaces -= len;
}
if (lineno == 1 || (lineno % opt_num_interval) == 0) {
static char fmt[] = "%1ld";
- if (view->digits <= 9)
- fmt[1] = '0' + digits3;
-
+ fmt[1] = '0' + (view->digits <= 9 ? digits3 : 1);
if (string_format(number, fmt, lineno))
text = number;
}
{
int i;
- if (request == REQ_NONE) {
- doupdate();
+ if (request == REQ_NONE)
return TRUE;
- }
if (request > REQ_NONE) {
open_run_request(request);
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;
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;
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);