diff options
| author | tao <2471314@gmail.com> | 2026-08-08 07:54:29 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-07 19:54:29 -0400 |
| commit | f0a01822850bf7324326a3424f6b9a6892e5a768 (patch) | |
| tree | e2b1cec6b6bc19a4ff5967d6d64a29292070ad1b /runtime/plugin/python_setup.vim | |
| parent | b53c00b42599f31c0bd30be75b4dd4be32fd883d (diff) | |
| download | rneovim-f0a01822850bf7324326a3424f6b9a6892e5a768.tar.gz rneovim-f0a01822850bf7324326a3424f6b9a6892e5a768.tar.bz2 rneovim-f0a01822850bf7324326a3424f6b9a6892e5a768.zip | |
refactor(path): pathcmp() #41035
Problem:
Redudant code
Solution:
Add `path_fold_char()` to normalize path sep.
Refactor `pathcmp()` and `path_fnamencmp()` into `path_cmp`.
| feature | pathcmp | path_fnamencmp | path_cmp(now) |
| ------------------------ | -------------- | -------------- | ------------- |
| case folding | `mb_toupper()` | `utf_fold()` | `utf_fold()` |
| consults fileignorecase | ✅ | ✅ | `ic` param |
| `maxlen` | ✅ | ✅ | ✅ |
| `/` == `\` | ✅ | ✅ | ✅ |
| MSWIN drive letter | ❌ | ✅ | ✅ |
| sep affects sorting | ✅ | ❌ | ✅ |
| ignores a trailing slash | ✅ | ❌ | ✅ |
Refactor `path_fnamecmp` and `path_full_compare` into `path_equal`,
with flags controlling "no filesystem" comparison (i.e. `path_cmp`), env
variables expansion, absolute path resolution and filesystem access.
Diffstat (limited to 'runtime/plugin/python_setup.vim')
0 files changed, 0 insertions, 0 deletions