diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-07-21 19:25:37 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-07-21 19:25:37 +0200 |
commit | defa067c54874dd987121dd7252c62755e0aebfa (patch) | |
tree | 4734b054e299ab86a5141b29a5305f7782edd81a /src/ex_docmd.c | |
parent | ed997adaa1e9bd057ce732a73d933b739e9d0c30 (diff) | |
download | vim-git-defa067c54874dd987121dd7252c62755e0aebfa.tar.gz |
patch 8.1.1727: code for viminfo support is spread outv8.1.1727
Problem: Code for viminfo support is spread out.
Solution: Move to code to viminfo.c. (Yegappan Lakshmanan, closes #4686)
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r-- | src/ex_docmd.c | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 462851d6a..d82491860 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -318,9 +318,7 @@ static int did_lcd; /* whether ":lcd" was produced for a session */ #ifndef FEAT_EVAL # define ex_compiler ex_ni #endif -#ifdef FEAT_VIMINFO -static void ex_viminfo(exarg_T *eap); -#else +#ifndef FEAT_VIMINFO # define ex_viminfo ex_ni #endif static void ex_behave(exarg_T *eap); @@ -10713,31 +10711,6 @@ put_line(FILE *fd, char *s) return OK; } -#ifdef FEAT_VIMINFO -/* - * ":rviminfo" and ":wviminfo". - */ - static void -ex_viminfo( - exarg_T *eap) -{ - char_u *save_viminfo; - - save_viminfo = p_viminfo; - if (*p_viminfo == NUL) - p_viminfo = (char_u *)"'100"; - if (eap->cmdidx == CMD_rviminfo) - { - if (read_viminfo(eap->arg, VIF_WANT_INFO | VIF_WANT_MARKS - | (eap->forceit ? VIF_FORCEIT : 0)) == FAIL) - emsg(_("E195: Cannot open viminfo file for reading")); - } - else - write_viminfo(eap->arg, eap->forceit); - p_viminfo = save_viminfo; -} -#endif - #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) || defined(PROTO) /* * Make a dialog message in "buff[DIALOG_MSG_SIZE]". |