| To: vim_dev@googlegroups.com |
| Subject: Patch 7.4.493 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.4.493 |
| Problem: A TextChanged autocommand is triggered when saving a file. |
| (William Gardner) |
| Solution: Update last_changedtick after calling unchanged(). (Christian |
| Brabandt) |
| Files: src/fileio.c |
| |
| |
| |
| |
| |
| *** 4877,4882 **** |
| --- 4877,4889 ---- |
| ) |
| { |
| unchanged(buf, TRUE); |
| + #ifdef FEAT_AUTOCMD |
| + /* buf->b_changedtick is always incremented in unchanged() but that |
| + * should not trigger a TextChanged event. */ |
| + if (last_changedtick + 1 == buf->b_changedtick |
| + && last_changedtick_buf == buf) |
| + last_changedtick = buf->b_changedtick; |
| + #endif |
| u_unchanged(buf); |
| u_update_save_nr(buf); |
| } |
| |
| |
| |
| *** 743,744 **** |
| --- 743,746 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 493, |
| /**/ |
| |
| -- |
| You know you use Vim too much when you have this alias in your |
| ~/.bashrc file: alias :e=/bin/vim (Eljay Love-Jensen) |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ |
| /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
| \\\ an exciting new programming language -- http://www.Zimbu.org /// |
| \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |