summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b3a54cb)
raw | patch | inline | side by side (parent: b3a54cb)
author | Jonas Fonseca <fonseca@diku.dk> | |
Sun, 21 May 2006 23:04:49 +0000 (01:04 +0200) | ||
committer | Jonas Fonseca <fonseca@antimatter.localdomain> | |
Sun, 21 May 2006 23:04:49 +0000 (01:04 +0200) |
tig.c | patch | blob | history |
index bf5309254db1ac46aa89a25e4db7a545fbed16cb..236c701935d1689ad2278c65820999fee65b1844 100644 (file)
--- a/tig.c
+++ b/tig.c
* Incremental updating
*/
+static void
+end_update(struct view *view)
+{
+ if (!view->pipe)
+ return;
+ set_nonblocking_input(FALSE);
+ if (view->pipe == stdin)
+ fclose(view->pipe);
+ else
+ pclose(view->pipe);
+ view->pipe = NULL;
+}
+
static bool
begin_update(struct view *view)
{
const char *id = view->id;
+ if (view->pipe)
+ end_update(view);
+
if (opt_cmd[0]) {
string_copy(view->cmd, opt_cmd);
opt_cmd[0] = 0;
return TRUE;
}
-static void
-end_update(struct view *view)
-{
- if (!view->pipe)
- return;
- set_nonblocking_input(FALSE);
- if (view->pipe == stdin)
- fclose(view->pipe);
- else
- pclose(view->pipe);
- view->pipe = NULL;
-}
-
static bool
update_view(struct view *view)
{