Commit aed4e49
authored
fix(apply_icons): filename may be truncated #243
Problem:
dirvish#add_icon_fn() may truncate filenames from the left, when icons
are being applied.
To see the issue, create files 'abc-file.txt', 'defg-file.txt', and
'file.txt' in a directory and display them in a dirvish buffer. All
filenames display as 'file.txt'.
The problem seems to occur when the basename of one of the files in the
directory matches the right-hand portion of one or more other filenames
in the same directory. However, experimentation shows that it does not
always happen in this case.
Solution:
Define each pattern to match an exact line.1 parent babbf69 commit aed4e49
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
| 424 | + | |
424 | 425 | | |
| 426 | + | |
425 | 427 | | |
426 | 428 | | |
427 | 429 | | |
| |||
433 | 435 | | |
434 | 436 | | |
435 | 437 | | |
436 | | - | |
| 438 | + | |
437 | 439 | | |
438 | 440 | | |
439 | 441 | | |
| |||
0 commit comments