Skip to content

Commit

Permalink
Only check for busy loop when no views are updating
Browse files Browse the repository at this point in the history
Fixes regression when loading the history in large repos.
  • Loading branch information
jonas committed Dec 18, 2017
1 parent 93a1fa7 commit e8c7126
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions NEWS.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Release notes
=============

master
------

Bug fixes:

- Fix busy loop detection to handle large repos. (GH #164)

tig-2.3.1
---------
Expand Down
4 changes: 3 additions & 1 deletion src/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e8c7126

Please sign in to comment.