1
0
forked from aniani/vim

patch 8.1.2211: listener callback "added" argument is not the total

Problem:    Listener callback "added" argument is not the total. (Andy
            Massimino)
Solution:   Compute the total. (closes #5105)
This commit is contained in:
Bram Moolenaar
2019-10-24 20:07:07 +02:00
parent b754b5bf6d
commit 336bf2b8b2
3 changed files with 11 additions and 4 deletions

View File

@@ -371,9 +371,9 @@ invoke_listeners(buf_T *buf)
if (start > lnum)
start = lnum;
lnum = dict_get_number(li->li_tv.vval.v_dict, (char_u *)"end");
if (lnum > end)
if (end < lnum)
end = lnum;
added = dict_get_number(li->li_tv.vval.v_dict, (char_u *)"added");
added += dict_get_number(li->li_tv.vval.v_dict, (char_u *)"added");
}
argv[1].v_type = VAR_NUMBER;
argv[1].vval.v_number = start;