comparison src/buffer.c @ 13519:4a44c90dd671 v8.0.1633

patch 8.0.1633: a TextChanged autocmd triggers when it is defined commit https://github.com/vim/vim/commit/8c64a36e40b8746404f7151abe6849393396af10 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Mar 23 22:39:31 2018 +0100 patch 8.0.1633: a TextChanged autocmd triggers when it is defined Problem: A TextChanged autocmd triggers when it is defined after creating a buffer. Solution: Set b_last_changedtick when opening a buffer. (Hirohito Highlight, closes #2742)
author Christian Brabandt <cb@256bit.org>
date Fri, 23 Mar 2018 22:45:07 +0100
parents 6740c499de13
children e9ffb5b35266
comparison
equal deleted inserted replaced
13518:0397a4db5af4 13519:4a44c90dd671
288 ) 288 )
289 changed(); 289 changed();
290 else if (retval == OK && !read_stdin && !read_fifo) 290 else if (retval == OK && !read_stdin && !read_fifo)
291 unchanged(curbuf, FALSE); 291 unchanged(curbuf, FALSE);
292 save_file_ff(curbuf); /* keep this fileformat */ 292 save_file_ff(curbuf); /* keep this fileformat */
293
294 /* Set last_changedtick to avoid triggering a TextChanged autocommand right
295 * after it was added. */
296 curbuf->b_last_changedtick = CHANGEDTICK(curbuf);
297 #ifdef FEAT_INS_EXPAND
298 curbuf->b_last_changedtick_pum = CHANGEDTICK(curbuf);
299 #endif
293 300
294 /* require "!" to overwrite the file, because it wasn't read completely */ 301 /* require "!" to overwrite the file, because it wasn't read completely */
295 #ifdef FEAT_EVAL 302 #ifdef FEAT_EVAL
296 if (aborting()) 303 if (aborting())
297 #else 304 #else