summaryrefslogtreecommitdiff
path: root/src/viminfo.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-08-06 21:59:57 +0200
committerBram Moolenaar <Bram@vim.org>2019-08-06 21:59:57 +0200
commitd7663c22c6c1ff0f86b81371586fbc851d3a3e9e (patch)
tree3979ae5a710ae9ca6fa4dcecde113961eca54cc1 /src/viminfo.c
parent0acae7acc40b9f12bff88d5e1dae494a761fec07 (diff)
downloadvim-git-d7663c22c6c1ff0f86b81371586fbc851d3a3e9e.tar.gz
patch 8.1.1823: command line history code is spread outv8.1.1823
Problem: Command line history code is spread out. Solution: Put the code in a new file. (Yegappan Lakshmanan, closes #4779) Also graduate the +cmdline_hist feature.
Diffstat (limited to 'src/viminfo.c')
-rw-r--r--src/viminfo.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/viminfo.c b/src/viminfo.c
index 1b09414be..608c5cc75 100644
--- a/src/viminfo.c
+++ b/src/viminfo.c
@@ -427,7 +427,6 @@ write_viminfo_bufferlist(FILE *fp)
vim_free(line);
}
-#if defined(FEAT_CMDHIST) || defined(PROTO)
/*
* Buffers for history read from a viminfo file. Only valid while reading.
*/
@@ -913,7 +912,6 @@ write_viminfo_history(FILE *fp, int merge)
viminfo_hisidx[type] = 0;
}
}
-#endif // FEAT_CMDHIST
static void
write_viminfo_barlines(vir_T *virp, FILE *fp_out)
@@ -2756,9 +2754,7 @@ read_viminfo_up_to_marks(
buf_T *buf;
int got_encoding = FALSE;
-#ifdef FEAT_CMDHIST
prepare_viminfo_history(forceit ? 9999 : 0, writing);
-#endif
eof = viminfo_readline(virp);
while (!eof && virp->vir_line[0] != '>')
@@ -2817,13 +2813,11 @@ read_viminfo_up_to_marks(
case '?':
case '=':
case '@':
-#ifdef FEAT_CMDHIST
// When history is in bar lines skip the old style history
// lines.
if (virp->vir_version < VIMINFO_VERSION_WITH_HISTORY)
eof = read_viminfo_history(virp, writing);
else
-#endif
eof = viminfo_readline(virp);
break;
case '-':
@@ -2844,11 +2838,9 @@ read_viminfo_up_to_marks(
}
}
-#ifdef FEAT_CMDHIST
// Finish reading history items.
if (!writing)
finish_viminfo_history(virp);
-#endif
// Change file names to buffer numbers for fmarks.
FOR_ALL_BUFFERS(buf)
@@ -2913,9 +2905,7 @@ do_viminfo(FILE *fp_in, FILE *fp_out, int flags)
fprintf(fp_out, "*encoding=%s\n\n", p_enc);
write_viminfo_search_pattern(fp_out);
write_viminfo_sub_string(fp_out);
-#ifdef FEAT_CMDHIST
write_viminfo_history(fp_out, merge);
-#endif
write_viminfo_registers(fp_out);
finish_viminfo_registers();
#ifdef FEAT_EVAL