Mercurial > vim
comparison src/evalfunc.c @ 13278:28ae299c6af0 v8.0.1513
patch 8.0.1513: the jumplist is not always properly cleaned up
commit https://github.com/vim/vim/commit/486797413791f6be12dcec6e5faf4f952e4647ae
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Feb 13 13:33:29 2018 +0100
patch 8.0.1513: the jumplist is not always properly cleaned up
Problem: The jumplist is not always properly cleaned up.
Solution: Call fname2fnum() before cleanup_jumplist(). (Yegappan Lakshmanan)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 13 Feb 2018 13:45:05 +0100 |
parents | abaebba89fd4 |
children | fbda23eb0996 |
comparison
equal
deleted
inserted
replaced
13277:99fc5a0fd96c | 13278:28ae299c6af0 |
---|---|
4856 | 4856 |
4857 if (list_append_list(rettv->vval.v_list, l) == FAIL) | 4857 if (list_append_list(rettv->vval.v_list, l) == FAIL) |
4858 return; | 4858 return; |
4859 list_append_number(rettv->vval.v_list, (varnumber_T)wp->w_jumplistidx); | 4859 list_append_number(rettv->vval.v_list, (varnumber_T)wp->w_jumplistidx); |
4860 | 4860 |
4861 cleanup_jumplist(wp); | 4861 cleanup_jumplist(wp, TRUE); |
4862 | |
4862 for (i = 0; i < wp->w_jumplistlen; ++i) | 4863 for (i = 0; i < wp->w_jumplistlen; ++i) |
4863 { | 4864 { |
4864 if (wp->w_jumplist[i].fmark.mark.lnum == 0) | 4865 if (wp->w_jumplist[i].fmark.mark.lnum == 0) |
4865 continue; | 4866 continue; |
4866 if (wp->w_jumplist[i].fmark.fnum == 0) | |
4867 fname2fnum(&wp->w_jumplist[i]); | |
4868 if ((d = dict_alloc()) == NULL) | 4867 if ((d = dict_alloc()) == NULL) |
4869 return; | 4868 return; |
4870 if (list_append_dict(l, d) == FAIL) | 4869 if (list_append_dict(l, d) == FAIL) |
4871 return; | 4870 return; |
4872 dict_add_nr_str(d, "lnum", (long)wp->w_jumplist[i].fmark.mark.lnum, | 4871 dict_add_nr_str(d, "lnum", (long)wp->w_jumplist[i].fmark.mark.lnum, |