summaryrefslogtreecommitdiff
path: root/find.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-02-28 16:35:38 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-02-28 16:35:38 -0500
commit52fd5e0c95da236fd14682ed8a7cfa34afbab2c0 (patch)
tree4f8ca7df068983ad6aa2de38a7862a9bb607f258 /find.c
parentfb2a0b9998a599f9e8a9a1e911fd43345778f6ef (diff)
set active_node to NULL when line buffer is active
Diffstat (limited to 'find.c')
-rw-r--r--find.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/find.c b/find.c
index 9298f53..509f1ac 100644
--- a/find.c
+++ b/find.c
@@ -429,7 +429,7 @@ static void find_menu_frame(Ted *ted, float x1, float y1, float x2, float y2) {
static void find_open(Ted *ted, bool replace) {
if (!ted->find && ted->active_buffer) {
ted->prev_active_buffer = ted->active_buffer;
- ted->active_buffer = &ted->find_buffer;
+ ted_switch_to_buffer(ted, &ted->find_buffer);
ted->find = true;
buffer_select_all(ted->active_buffer);
}
@@ -441,6 +441,6 @@ static void find_open(Ted *ted, bool replace) {
static void find_close(Ted *ted) {
ted->find = false;
- ted->active_buffer = ted->prev_active_buffer;
+ ted_switch_to_buffer(ted, ted->prev_active_buffer);
find_free_pattern(ted);
}