summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-06-08 18:07:21 +0200
committerBram Moolenaar <Bram@vim.org>2019-06-08 18:07:21 +0200
commitc024b4667875e5bc6fd0ed791530e33c3161bff7 (patch)
tree4b7c358c24cb5f5d6d36a40250afbd44eaf6dda7 /runtime
parentaef5c62a6fff7654bb8df7b9359e811f7a6e428f (diff)
patch 8.1.1498: ":write" increments b:changedtick even though nothing changedv8.1.1498
Problem: ":write" increments b:changedtick even though nothing changed. (Daniel Hahler) Solution: Only increment b:changedtick if the modified flag is reset.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 0b44e58e24..85230a60a4 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1504,8 +1504,10 @@ One local buffer variable is predefined:
*b:changedtick* *changetick*
b:changedtick The total number of changes to the current buffer. It is
incremented for each change. An undo command is also a change
- in this case. This can be used to perform an action only when
- the buffer has changed. Example: >
+ in this case. Resetting 'modified' when writing the buffer is
+ also counted.
+ This can be used to perform an action only when the buffer has
+ changed. Example: >
:if my_changedtick != b:changedtick
: let my_changedtick = b:changedtick
: call My_Update()