summaryrefslogtreecommitdiff
path: root/find.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-03-07 12:48:42 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-03-07 12:48:42 -0500
commita47ac4affa33ec43b9073f5c154879185d5e9fb7 (patch)
treea21f40555b9080136ac99b28dc6a3375239a908d /find.c
parentd84ff1e2eeae6feb0154a80bd3efc9ad15dc5f75 (diff)
change focus to search term, even when find is already open
Diffstat (limited to 'find.c')
-rw-r--r--find.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/find.c b/find.c
index 2878015..b682a2b 100644
--- a/find.c
+++ b/find.c
@@ -451,14 +451,14 @@ static void find_menu_frame(Ted *ted, Rect menu_bounds) {
}
static void find_open(Ted *ted, bool replace) {
- if (!ted->find && ted->active_buffer) {
+ if (ted->active_buffer && ted_is_regular_buffer(ted, ted->active_buffer)) {
ted->prev_active_buffer = ted->active_buffer;
ted_switch_to_buffer(ted, &ted->find_buffer);
ted->find = true;
buffer_select_all(ted->active_buffer);
+ ted->replace = replace;
+ find_update(ted, true);
}
- ted->replace = replace;
- find_update(ted, true);
}
static void find_close(Ted *ted) {