diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-18 20:54:07 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-18 20:54:07 -0500 |
commit | 8a4984e0e15fcfb0be6db242ab3f60325b80abd8 (patch) | |
tree | b71eb3ec8e715164a9347cb6ce7d6d83298309d0 /command.c | |
parent | 530001a433c847b40d109d08cd8ff0958efdca1c (diff) |
bug fixes, narrow file list based on search term
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -157,14 +157,12 @@ void command_execute(Ted *ted, Command c, i64 argument) { break; case MENU_OPEN: { TextBuffer *open_to = &ted->main_buffer; - String32 filename32 = {.str = buffer->lines[0].str, .len = buffer->lines[0].len}; - - char *filename_cstr = str32_to_utf8_cstr(filename32); + char *filename_cstr = str32_to_utf8_cstr(buffer_get_line(&ted->line_buffer, 0)); if (filename_cstr) { buffer_load_file(open_to, filename_cstr); buffer = open_to; if (buffer_haserr(open_to)) { - // @TODO: something better + // @TODO: something } free(filename_cstr); menu_close(ted, true); |