summaryrefslogtreecommitdiff
path: root/ui.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-10-19 11:18:54 -0400
committerpommicket <pommicket@gmail.com>2023-10-19 11:18:54 -0400
commit553f01db25db52eea5396b575c66e2a6e77db1ce (patch)
tree75e7452c311719bbd9f022d8c549052db82ebce3 /ui.c
parent94c2b5a926cd7273272fb9fe268dd61c50426c59 (diff)
is_path_separator
Diffstat (limited to 'ui.c')
-rw-r--r--ui.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui.c b/ui.c
index 06c0240..995c631 100644
--- a/ui.c
+++ b/ui.c
@@ -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)) {