diff options
author | watiko <service@mail.watiko.net> | 2015-11-28 01:24:01 +0900 |
---|---|---|
committer | watiko <service@mail.watiko.net> | 2015-11-28 17:22:52 +0900 |
commit | 789041c2829d8abb96a0f5f7a844632052a1a448 (patch) | |
tree | bc3297aa95c910ed2514e05818e3c15571f35243 | |
parent | 119545190c1ec35e1c7b482f593b98d0fc485b6f (diff) | |
download | rneovim-789041c2829d8abb96a0f5f7a844632052a1a448.tar.gz rneovim-789041c2829d8abb96a0f5f7a844632052a1a448.tar.bz2 rneovim-789041c2829d8abb96a0f5f7a844632052a1a448.zip |
vim-patch:7.4.787
Problem: snprintf() isn't available everywhere.
Solution: Use vim_snprintf(). (Ken Takata)
https://github.com/vim/vim/commit/fb9bc4829a1442fc8e93f078c9f923c9d382dbd2
-rw-r--r-- | src/nvim/option.c | 12 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 20f005eba9..87b213818c 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -3866,9 +3866,9 @@ set_bool_option ( if (!starting) { char_u buf_old[2], buf_new[2], buf_type[7]; - snprintf((char *)buf_old, 2, "%d", old_value ? TRUE: FALSE); - snprintf((char *)buf_new, 2, "%d", value ? TRUE: FALSE); - sprintf((char *)buf_type, "%s", (opt_flags & OPT_LOCAL) ? "local" : "global"); + vim_snprintf((char *)buf_old, 2, "%d", old_value ? TRUE: FALSE); + vim_snprintf((char *)buf_new, 2, "%d", value ? TRUE: FALSE); + vim_snprintf((char *)buf_type, 7, "%s", (opt_flags & OPT_LOCAL) ? "local" : "global"); set_vim_var_string(VV_OPTION_NEW, buf_new, -1); set_vim_var_string(VV_OPTION_OLD, buf_old, -1); set_vim_var_string(VV_OPTION_TYPE, buf_type, -1); @@ -4249,9 +4249,9 @@ set_num_option ( if (!starting && errmsg == NULL) { char_u buf_old[11], buf_new[11], buf_type[7]; - snprintf((char *)buf_old, 10, "%ld", old_value); - snprintf((char *)buf_new, 10, "%ld", value); - snprintf((char *)buf_type, 7, "%s", (opt_flags & OPT_LOCAL) ? "local" : "global"); + vim_snprintf((char *)buf_old, 10, "%ld", old_value); + vim_snprintf((char *)buf_new, 10, "%ld", value); + vim_snprintf((char *)buf_type, 7, "%s", (opt_flags & OPT_LOCAL) ? "local" : "global"); set_vim_var_string(VV_OPTION_NEW, buf_new, -1); set_vim_var_string(VV_OPTION_OLD, buf_old, -1); set_vim_var_string(VV_OPTION_TYPE, buf_type, -1); diff --git a/src/nvim/version.c b/src/nvim/version.c index 83897fba86..4736d3f186 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -209,7 +209,7 @@ static int included_patches[] = { // 790, // 789, // 788 NA - // 787, + 787, 786, // 785, 784, |