From e8c71269ab69e569caefc8f24fecf3145d170244 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Mon, 18 Dec 2017 12:07:15 -0500 Subject: [PATCH] Only check for busy loop when no views are updating Fixes regression when loading the history in large repos. --- NEWS.adoc | 7 +++++++ src/display.c | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/NEWS.adoc b/NEWS.adoc index 2f25ed347..bcc7e1846 100644 --- a/NEWS.adoc +++ b/NEWS.adoc @@ -1,6 +1,13 @@ Release notes ============= +master +------ + +Bug fixes: + + - Fix busy loop detection to handle large repos. (GH #164) + tig-2.3.1 --------- diff --git a/src/display.c b/src/display.c index 8affa3363..f8c5e7ae2 100644 --- a/src/display.c +++ b/src/display.c @@ -844,7 +844,9 @@ get_input(int prompt_position, struct key *key) /* wgetch() with nodelay() enabled returns ERR when * there's no input. */ if (key_value == ERR) { - detect_busy_loop(1000, 5000); + // Only check busy loop if no views are updating. + if (delay != 0) + detect_busy_loop(1000, 5000); } else if (key_value == KEY_RESIZE) { int height, width;