0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.1.0126: various problems with 'vartabstop'

Problem:    Various problems with 'vartabstop'.
Solution:   Fix memory leak.  Fix crash. Add a few more tests. (Christian
            Brabandt, closes #3076)
This commit is contained in:
Bram Moolenaar
2018-06-28 22:23:00 +02:00
parent 630afe889a
commit 307ac5c68e
5 changed files with 38 additions and 13 deletions

View File

@@ -866,7 +866,6 @@ ex_retab(exarg_T *eap)
{
set_string_option_direct((char_u *)"vts", -1, new_ts_str,
OPT_FREE|OPT_LOCAL, 0);
vim_free(new_ts_str);
curbuf->b_p_vts_array = new_vts_array;
vim_free(old_vts_ary);
}
@@ -877,6 +876,7 @@ ex_retab(exarg_T *eap)
curbuf->b_p_ts = tabstop_first(new_vts_array);
vim_free(new_vts_array);
}
vim_free(new_ts_str);
}
#else
curbuf->b_p_ts = new_ts;