summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Koutcher <thomas.koutcher@online.fr>2023-01-03 22:32:15 +0100
committerThomas Koutcher <thomas.koutcher@online.fr>2023-01-03 22:32:15 +0100
commit6a3eb94fb70ce72a09478491049191e2a03e055f (patch)
tree75ac7ca51bce9c32b2e6bc426312dc0d632d53b7
parentd803c7baecb202a1fa3fce95ddfe90bd85031e2e (diff)
Clean IO before closing a view or quitting
Make sure that a command still running in a view is properly terminated when the view is closed. This is mostly visible in the pager view. That should pretty much make #828 redundant.
-rw-r--r--src/tig.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tig.c b/src/tig.c
index 8d3ed222..c8e6786c 100644
--- a/src/tig.c
+++ b/src/tig.c
@@ -324,6 +324,7 @@ view_driver(struct view *view, enum request request)
* view itself. Parents to closed view should never be
* followed. */
if (view->prev && view->prev != view) {
+ end_update(view, true);
maximize_view(view->prev, true);
view->prev = view;
break;
@@ -334,6 +335,8 @@ view_driver(struct view *view, enum request request)
}
/* Fall-through */
case REQ_QUIT:
+ foreach_view(view, i)
+ end_update(view, true);
return false;
default: