summaryrefslogtreecommitdiffstats
path: root/src/getchar.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-04-22 22:33:57 +0000
committerBram Moolenaar <Bram@vim.org>2006-04-22 22:33:57 +0000
commiteb3593b38b7b6b658e93ad05d6caf76d58cc0c35 (patch)
tree39210f19a86e4db2914523b0fde4a5ff9d345c16 /src/getchar.c
parent57657d85c6c3d812e99b5e5d5161c07c66ac7dc7 (diff)
updated for version 7.0e06v7.0e06
Diffstat (limited to 'src/getchar.c')
-rw-r--r--src/getchar.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/getchar.c b/src/getchar.c
index 88381b176e..782bdbee01 100644
--- 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)
{