Mercurial > vim
comparison src/filepath.c @ 29239:da56650de132 v8.2.5138
patch 8.2.5138: various small issues
Commit: https://github.com/vim/vim/commit/8088ae95bbed2085c5fb196850c4e4b8df55c989
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jun 20 11:38:17 2022 +0100
patch 8.2.5138: various small issues
Problem: Various small issues.
Solution: Various small improvments.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 20 Jun 2022 12:45:03 +0200 |
parents | 495d55210aac |
children | f8b07c537036 |
comparison
equal
deleted
inserted
replaced
29238:ee6d7b2b9704 | 29239:da56650de132 |
---|---|
1312 if (p_wic) | 1312 if (p_wic) |
1313 options += WILD_ICASE; | 1313 options += WILD_ICASE; |
1314 if (rettv->v_type == VAR_STRING) | 1314 if (rettv->v_type == VAR_STRING) |
1315 rettv->vval.v_string = ExpandOne(&xpc, tv_get_string(&argvars[0]), | 1315 rettv->vval.v_string = ExpandOne(&xpc, tv_get_string(&argvars[0]), |
1316 NULL, options, WILD_ALL); | 1316 NULL, options, WILD_ALL); |
1317 else if (rettv_list_alloc(rettv) != FAIL) | 1317 else if (rettv_list_alloc(rettv) == OK) |
1318 { | 1318 { |
1319 int i; | 1319 int i; |
1320 | 1320 |
1321 ExpandOne(&xpc, tv_get_string(&argvars[0]), | 1321 ExpandOne(&xpc, tv_get_string(&argvars[0]), |
1322 NULL, options, WILD_ALL_KEEP); | 1322 NULL, options, WILD_ALL_KEEP); |
1393 { | 1393 { |
1394 ga_init2(&ga, sizeof(char_u *), 10); | 1394 ga_init2(&ga, sizeof(char_u *), 10); |
1395 globpath(tv_get_string(&argvars[0]), file, &ga, flags); | 1395 globpath(tv_get_string(&argvars[0]), file, &ga, flags); |
1396 if (rettv->v_type == VAR_STRING) | 1396 if (rettv->v_type == VAR_STRING) |
1397 rettv->vval.v_string = ga_concat_strings(&ga, "\n"); | 1397 rettv->vval.v_string = ga_concat_strings(&ga, "\n"); |
1398 else if (rettv_list_alloc(rettv) != FAIL) | 1398 else if (rettv_list_alloc(rettv) == OK) |
1399 for (i = 0; i < ga.ga_len; ++i) | 1399 for (i = 0; i < ga.ga_len; ++i) |
1400 list_append_string(rettv->vval.v_list, | 1400 list_append_string(rettv->vval.v_list, |
1401 ((char_u **)(ga.ga_data))[i], -1); | 1401 ((char_u **)(ga.ga_data))[i], -1); |
1402 ga_clear_strings(&ga); | 1402 ga_clear_strings(&ga); |
1403 } | 1403 } |