From: Paul Ollis Date: Fri, 28 Nov 2025 20:21:29 +0000 (+0000) Subject: runtime(doc): Clarification in listener_add() doc X-Git-Tag: v9.1.1934~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9ade3f5894abee2e7f343881964ce8d6c0423564;p=thirdparty%2Fvim.git 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 Signed-off-by: Christian Brabandt --- diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 988824f4ba..2bc6c89965 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