summaryrefslogtreecommitdiff
path: root/ted.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 /ted.c
parentd84ff1e2eeae6feb0154a80bd3efc9ad15dc5f75 (diff)
change focus to search term, even when find is already open
Diffstat (limited to 'ted.c')
-rw-r--r--ted.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ted.c b/ted.c
index 8f999a6..9e4fe1b 100644
--- a/ted.c
+++ b/ted.c
@@ -51,6 +51,10 @@ static void ted_full_path(Ted *ted, char const *relpath, char *abspath, size_t a
path_full(ted->cwd, relpath, abspath, abspath_size);
}
+static bool ted_is_regular_buffer(Ted *ted, TextBuffer *buffer) {
+ return buffer >= ted->buffers && buffer < ted->buffers + TED_MAX_BUFFERS;
+}
+
// Check the various places a file could be, and return the full path.
static Status ted_get_file(Ted const *ted, char const *name, char *out, size_t outsz) {
if (ted->search_cwd && fs_file_exists(name)) {