summaryrefslogtreecommitdiff
path: root/src/change.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-10-24 20:07:07 +0200
committerBram Moolenaar <Bram@vim.org>2019-10-24 20:07:07 +0200
commit336bf2b8b269e2591576b9f580e79edb93e23c62 (patch)
treec2e62950b68cc8a87fd4a888b237d0ffe509191a /src/change.c
parentb754b5bf6d9ac1f3654552973aa6f9c11239af3d (diff)
downloadvim-git-336bf2b8b269e2591576b9f580e79edb93e23c62.tar.gz
patch 8.1.2211: listener callback "added" argument is not the totalv8.1.2211
Problem: Listener callback "added" argument is not the total. (Andy Massimino) Solution: Compute the total. (closes #5105)
Diffstat (limited to 'src/change.c')
-rw-r--r--src/change.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/change.c b/src/change.c
index caf9db0d7..da6a72b56 100644
--- a/src/change.c
+++ b/src/change.c
@@ -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;