diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-07-23 22:15:25 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-07-23 22:15:25 +0200 |
commit | c3328169d5566b97a6a6921067017e4369dd7cd6 (patch) | |
tree | 88ffb8f039efc23a461181aeae7b0bdf606b2404 /src/option.c | |
parent | c61a48d25995e5ee2a3813f64c531b91bb23e9b9 (diff) | |
download | vim-git-c3328169d5566b97a6a6921067017e4369dd7cd6.tar.gz |
patch 8.1.1736: viminfo support is spread outv8.1.1736
Problem: Viminfo support is spread out.
Solution: Move more viminfo code to viminfo.c. (Yegappan Lakshmanan,
closes #4717) Reorder code to make most functions static.
Diffstat (limited to 'src/option.c')
-rw-r--r-- | src/option.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/src/option.c b/src/option.c index c17e9128a..3959d4711 100644 --- a/src/option.c +++ b/src/option.c @@ -5573,49 +5573,6 @@ set_options_bin( } } -#ifdef FEAT_VIMINFO -/* - * Find the parameter represented by the given character (eg ', :, ", or /), - * and return its associated value in the 'viminfo' string. - * Only works for number parameters, not for 'r' or 'n'. - * If the parameter is not specified in the string or there is no following - * number, return -1. - */ - int -get_viminfo_parameter(int type) -{ - char_u *p; - - p = find_viminfo_parameter(type); - if (p != NULL && VIM_ISDIGIT(*p)) - return atoi((char *)p); - return -1; -} - -/* - * Find the parameter represented by the given character (eg ''', ':', '"', or - * '/') in the 'viminfo' option and return a pointer to the string after it. - * Return NULL if the parameter is not specified in the string. - */ - char_u * -find_viminfo_parameter(int type) -{ - char_u *p; - - for (p = p_viminfo; *p; ++p) - { - if (*p == type) - return p + 1; - if (*p == 'n') /* 'n' is always the last one */ - break; - p = vim_strchr(p, ','); /* skip until next ',' */ - if (p == NULL) /* hit the end without finding parameter */ - break; - } - return NULL; -} -#endif - /* * Expand environment variables for some string options. * These string options cannot be indirect! |