Commit: runtime(doc): Clarification in listener_add() doc

1 view
Skip to first unread message

Christian Brabandt

unread,
Nov 28, 2025, 3:30:41 PM (11 days ago) Nov 28
to vim...@googlegroups.com
runtime(doc): Clarification in listener_add() doc

Commit: https://github.com/vim/vim/commit/9ade3f5894abee2e7f343881964ce8d6c0423564
Author: Paul Ollis <pa...@cleversheep.org>
Date: Fri Nov 28 20:21:29 2025 +0000

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 <pa...@cleversheep.org>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index 988824f4b..2bc6c8996 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -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
Reply all
Reply to author
Forward
0 new messages