Code

Handle REQ_NONE upfront in view_driver
authorJonas Fonseca <fonseca@diku.dk>
Mon, 17 Sep 2007 23:52:02 +0000 (01:52 +0200)
committerJonas Fonseca <fonseca@diku.dk>
Mon, 17 Sep 2007 23:52:02 +0000 (01:52 +0200)
It is very common during loading from pipe so deserves the small
optimization.

tig.c

diff --git a/tig.c b/tig.c
index 246812f2c6e7fa1518a05a621fe664e95495a600..ac2aba0f1b26da9be2e928a88f2fb51ff6c5c59d 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -2178,6 +2178,11 @@ view_driver(struct view *view, enum request request)
 {
        int i;
 
+       if (request == REQ_NONE) {
+               doupdate();
+               return TRUE;
+       }
+
        if (view && view->lines) {
                request = view->ops->request(view, request, &view->line[view->lineno]);
                if (request == REQ_NONE)