summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Fonseca <jonas.fonseca@gmail.com>2014-03-17 21:26:05 -0400
committerJonas Fonseca <jonas.fonseca@gmail.com>2014-03-17 21:26:42 -0400
commite10b5c03f87455ac0f885890aa6a568c373efba9 (patch)
treed92ca3ae9924f96998fb968d0e1d5ecf79257112
parent3db3569acff873cd38ca48c2c657eda22f459874 (diff)
grep: fix detection of initial view in open_grep_view()
-rw-r--r--src/grep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/grep.c b/src/grep.c
index f1415d21..bdc0038b 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -104,7 +104,7 @@ open_grep_view(struct view *prev)
struct view *view = VIEW(REQ_VIEW_GREP);
bool in_grep_view = prev == view;
- if (is_initial_view(view) || (view->lines && !in_grep_view)) {
+ if ((!prev && is_initial_view(view)) || (view->lines && !in_grep_view)) {
open_view(prev, REQ_VIEW_GREP, OPEN_DEFAULT);
} else {
if (grep_prompt())