Mercurial > vim
comparison src/insexpand.c @ 22248:80a000b09cb0 v8.2.1673
patch 8.2.1673: complete_info() selected index has an invalid value
Commit: https://github.com/vim/vim/commit/b806aa5bd910dba94fbde586f6019b4825813d28
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Sep 12 22:52:57 2020 +0200
patch 8.2.1673: complete_info() selected index has an invalid value
Problem: complete_info() selected index has an invalid value. (Ben Jackson)
Solution: Set the index when there is only one match. (closes https://github.com/vim/vim/issues/6945)
Add test for complete_info().
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 12 Sep 2020 23:00:03 +0200 |
parents | 9064044fd4f6 |
children | bd61aaf7f2a0 |
comparison
equal
deleted
inserted
replaced
22247:0201b99c7364 | 22248:80a000b09cb0 |
---|---|
4007 } | 4007 } |
4008 else if (compl_curr_match->cp_next == compl_curr_match->cp_prev) | 4008 else if (compl_curr_match->cp_next == compl_curr_match->cp_prev) |
4009 { | 4009 { |
4010 edit_submode_extra = (char_u *)_("The only match"); | 4010 edit_submode_extra = (char_u *)_("The only match"); |
4011 edit_submode_highl = HLF_COUNT; | 4011 edit_submode_highl = HLF_COUNT; |
4012 compl_curr_match->cp_number = 0; | |
4012 } | 4013 } |
4013 else | 4014 else |
4014 { | 4015 { |
4015 // Update completion sequence number when needed. | 4016 // Update completion sequence number when needed. |
4016 if (compl_curr_match->cp_number == -1) | 4017 if (compl_curr_match->cp_number == -1) |