summaryrefslogtreecommitdiff
path: root/src/ex_docmd.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-07-21 19:25:37 +0200
committerBram Moolenaar <Bram@vim.org>2019-07-21 19:25:37 +0200
commitdefa067c54874dd987121dd7252c62755e0aebfa (patch)
tree4734b054e299ab86a5141b29a5305f7782edd81a /src/ex_docmd.c
parented997adaa1e9bd057ce732a73d933b739e9d0c30 (diff)
downloadvim-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.c29
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]".