From eb3593b38b7b6b658e93ad05d6caf76d58cc0c35 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 22 Apr 2006 22:33:57 +0000 Subject: updated for version 7.0e06 --- src/getchar.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'src/getchar.c') 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) { -- cgit v1.2.3