runtime(doc): Clarification in listener_add() doc

Make it clear that the overall end value can be greater than
line('$') + 1.

fixes: #18664
closes: #18828

Signed-off-by: Paul Ollis <paul@cleversheep.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Paul Ollis
2025-11-28 20:21:29 +00:00
committed by Christian Brabandt
parent cbcbff8712
commit 9ade3f5894

View File

@ -1,4 +1,4 @@
*builtin.txt* For Vim version 9.1. Last change: 2025 Nov 27
*builtin.txt* For Vim version 9.1. Last change: 2025 Nov 28
VIM REFERENCE MANUAL by Bram Moolenaar
@ -6773,9 +6773,10 @@ listener_add({callback} [, {buf} [, {unbuffered}]]) *listener_add()*
The entries are in the order the changes were made, thus the
most recent change is at the end.
Because of the third trigger reason for triggering a callback
listed above, the line numbers passed to the callback are not
guaranteed to be valid. If this is a problem then make
Because of the third reason for triggering a callback listed
above, the line numbers passed to the callback are not
guaranteed to be valid. In particular, the end value can be
greater than line('$') + 1. If this is a problem then make
{unbuffered} |TRUE|.
When {unbuffered} is |TRUE| the {callback} is invoked for every