From 79e48082f579f6c02a55b7cff81ecee1c4127b29 Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Fri, 16 Aug 2019 01:09:29 -0700 Subject: Simplify input_delimiter handling --- src/fzy.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/fzy.c') diff --git a/src/fzy.c b/src/fzy.c index 6b9aa5a..c2e5600 100644 --- a/src/fzy.c +++ b/src/fzy.c @@ -27,11 +27,11 @@ int main(int argc, char *argv[]) { fprintf(stderr, "Must specify -e/--show-matches with --benchmark\n"); exit(EXIT_FAILURE); } - choices_fread(&choices, stdin); + choices_fread(&choices, stdin, options.input_delimiter); for (int i = 0; i < options.benchmark; i++) choices_search(&choices, options.filter); } else if (options.filter) { - choices_fread(&choices, stdin); + choices_fread(&choices, stdin, options.input_delimiter); choices_search(&choices, options.filter); for (size_t i = 0; i < choices_available(&choices); i++) { if (options.show_scores) @@ -42,13 +42,13 @@ int main(int argc, char *argv[]) { /* interactive */ if (isatty(STDIN_FILENO)) - choices_fread(&choices, stdin); + choices_fread(&choices, stdin, options.input_delimiter); tty_t tty; tty_init(&tty, options.tty_filename); if (!isatty(STDIN_FILENO)) - choices_fread(&choices, stdin); + choices_fread(&choices, stdin, options.input_delimiter); if (options.num_lines > choices.size) options.num_lines = choices.size; -- cgit v1.2.3