aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/vim.c
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2016-12-11 22:55:12 -0500
committerJames McCoy <jamessan@jamessan.com>2016-12-11 23:17:50 -0500
commit79c711670c11b395a3d78d2782e109eb04f4331e (patch)
treedc915d18567d7d85c26c43e3aac05c0853a9bde7 /src/nvim/api/vim.c
parent29e651515fec1a4bc2cd41ed1c04eb5d03250525 (diff)
downloadrneovim-79c711670c11b395a3d78d2782e109eb04f4331e.tar.gz
rneovim-79c711670c11b395a3d78d2782e109eb04f4331e.tar.bz2
rneovim-79c711670c11b395a3d78d2782e109eb04f4331e.zip
option.c: Update free_oldval after adjusting opt_idx for shada/viminfo
Previously, free_oldval was set immediately on entering did_set_string_option. However, opt_idx hadn't been adjusted to account for diverting 'viminfo' manipulation to 'shada'. Therefore, the code which determines whether to free the old value was looking at the flags for 'viminfo' while the code which sets whether a value was allocated was modifying the flags for 'shada'. This led to a leak of any values set for 'viminfo'. Updating free_oldval once opt_idx has been adjusted for the 'viminfo'/'shada' handling ensures the check/set values are consistent. Closes #5698
Diffstat (limited to 'src/nvim/api/vim.c')
0 files changed, 0 insertions, 0 deletions