comparison src/memline.c @ 10952:835604f3c37a v8.0.0365

patch 8.0.0365: might free a dict item that wasn't allocated commit https://github.com/vim/vim/commit/95c526e1f6d76acafee4b21f5701d6d6ac8c4b5f Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 25 14:59:34 2017 +0100 patch 8.0.0365: might free a dict item that wasn't allocated Problem: Might free a dict item that wasn't allocated. Solution: Call dictitem_free(). (Nikolai Pavlov) Use this for b:changedtick.
author Christian Brabandt <cb@256bit.org>
date Sat, 25 Feb 2017 15:00:05 +0100
parents d513b653f5d0
children 2f041b367cd9
comparison
equal deleted inserted replaced
10951:32704a1de17c 10952:835604f3c37a
1647 /* Recovering an empty file results in two lines and the first line is 1647 /* Recovering an empty file results in two lines and the first line is
1648 * empty. Don't set the modified flag then. */ 1648 * empty. Don't set the modified flag then. */
1649 if (!(curbuf->b_ml.ml_line_count == 2 && *ml_get(1) == NUL)) 1649 if (!(curbuf->b_ml.ml_line_count == 2 && *ml_get(1) == NUL))
1650 { 1650 {
1651 changed_int(); 1651 changed_int();
1652 ++*curbuf->b_changedtick; 1652 ++CHANGEDTICK(curbuf);
1653 } 1653 }
1654 } 1654 }
1655 else 1655 else
1656 { 1656 {
1657 for (idx = 1; idx <= lnum; ++idx) 1657 for (idx = 1; idx <= lnum; ++idx)
1661 i = STRCMP(p, ml_get(idx + lnum)); 1661 i = STRCMP(p, ml_get(idx + lnum));
1662 vim_free(p); 1662 vim_free(p);
1663 if (i != 0) 1663 if (i != 0)
1664 { 1664 {
1665 changed_int(); 1665 changed_int();
1666 ++*curbuf->b_changedtick; 1666 ++CHANGEDTICK(curbuf);
1667 break; 1667 break;
1668 } 1668 }
1669 } 1669 }
1670 } 1670 }
1671 1671