diff options
author | pommicket <pommicket@gmail.com> | 2023-10-19 11:18:54 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-10-19 11:18:54 -0400 |
commit | 553f01db25db52eea5396b575c66e2a6e77db1ce (patch) | |
tree | 75e7452c311719bbd9f022d8c549052db82ebce3 /ui.c | |
parent | 94c2b5a926cd7273272fb9fe268dd61c50426c59 (diff) |
is_path_separator
Diffstat (limited to 'ui.c')
-rw-r--r-- | ui.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -527,7 +527,7 @@ char *file_selector_update(Ted *ted, FileSelector *fs) { u32 first_path_sep = U32_MAX, last_path_sep = U32_MAX; for (u32 i = 0; i < search_term32.len; ++i) { char32_t c = search_term32.str[i]; - if (c < CHAR_MAX && strchr(ALL_PATH_SEPARATORS, (char)c)) { + if (c < CHAR_MAX && is_path_separator((char)c)) { last_path_sep = i; if (first_path_sep == U32_MAX) first_path_sep = i; @@ -541,7 +541,7 @@ char *file_selector_update(Ted *ted, FileSelector *fs) { if (dir_name) { // replace all members of ALL_PATH_SEPARATORS with PATH_SEPARATOR in dir_name (i.e. change / to \ on windows) for (char *p = dir_name; *p; ++p) - if (strchr(ALL_PATH_SEPARATORS, *p)) + if (is_path_separator(*p)) *p = PATH_SEPARATOR; if (file_selector_cd(ted, fs, dir_name)) { |