comparison src/ex_getln.c @ 8406:5d926807c19c v7.4.1494

commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 5 21:21:24 2016 +0100 patch 7.4.1494 Problem: clr_history() does not work properly. Solution: Increment hisptr. Add a test. (Yegappan Lakshmanan)
author Christian Brabandt <cb@256bit.org>
date Sat, 05 Mar 2016 21:30:05 +0100
parents eed1ca42f9aa
children 630300c7a26c
comparison
equal deleted inserted replaced
8405:c440e8a53d6c 8406:5d926807c19c
5781 hisptr = history[histype]; 5781 hisptr = history[histype];
5782 for (i = hislen; i--;) 5782 for (i = hislen; i--;)
5783 { 5783 {
5784 vim_free(hisptr->hisstr); 5784 vim_free(hisptr->hisstr);
5785 clear_hist_entry(hisptr); 5785 clear_hist_entry(hisptr);
5786 hisptr++;
5786 } 5787 }
5787 hisidx[histype] = -1; /* mark history as cleared */ 5788 hisidx[histype] = -1; /* mark history as cleared */
5788 hisnum[histype] = 0; /* reset identifier counter */ 5789 hisnum[histype] = 0; /* reset identifier counter */
5789 return OK; 5790 return OK;
5790 } 5791 }