Mercurial > vim
diff src/getchar.c @ 840:2c885fab04e3 v7.0e06
updated for version 7.0e06
author | vimboss |
---|---|
date | Sat, 22 Apr 2006 22:33:57 +0000 |
parents | 6bb1fa855dc9 |
children | c2cae213194d |
line wrap: on
line diff
--- a/src/getchar.c +++ b/src/getchar.c @@ -4053,14 +4053,19 @@ ExpandMappings(regmatch, num_file, file) } } /* for (round) */ - /* Sort the matches */ - sort_strings(*file, count); - - /* Remove multiple entries */ + if (count > 1) { - char_u **ptr1 = *file; - char_u **ptr2 = ptr1 + 1; - char_u **ptr3 = ptr1 + count; + char_u **ptr1; + char_u **ptr2; + char_u **ptr3; + + /* Sort the matches */ + sort_strings(*file, count); + + /* Remove multiple entries */ + ptr1 = *file; + ptr2 = ptr1 + 1; + ptr3 = ptr1 + count; while (ptr2 < ptr3) {