Code

Fix handling of REQ_NEXT/REQ_PREVIOUS
authorJonas Fonseca <fonseca@diku.dk>
Sun, 19 Aug 2007 09:02:21 +0000 (11:02 +0200)
committerJonas Fonseca <fonseca@diku.dk>
Sun, 19 Aug 2007 09:02:21 +0000 (11:02 +0200)
The special browsing of the main view was broken by commit
586c423dd99238a85c556df86e043dcfacffe277, when the REQ_ENTER
case was removed.

tig.c

diff --git a/tig.c b/tig.c
index 02280070025b7a060ed2708b4d8a34b107cc2099..c3bc1f4a30fce9b3f7f70603b0e3fd56d7b8fa0a 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -2221,14 +2221,14 @@ view_driver(struct view *view, enum request request)
                        move_view(view, request);
                        if (view_is_displayed(view))
                                update_view_title(view);
-                       if (line == view->lineno)
-                               break;
+                       if (line != view->lineno)
+                               view->ops->request(view, REQ_ENTER,
+                                                  &view->line[view->lineno]);
+
                } else {
                        move_view(view, request);
-                       break;
                }
-               /* Fall-through */
-
+               break;
 
        case REQ_VIEW_NEXT:
        {