1
0
forked from aniani/vim

patch 8.1.1736: viminfo support is spread out

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.
This commit is contained in:
Bram Moolenaar
2019-07-23 22:15:25 +02:00
parent c61a48d259
commit c3328169d5
13 changed files with 1794 additions and 1740 deletions

View File

@@ -31,9 +31,6 @@ static char_u *next_fenc(char_u **pp);
#ifdef FEAT_EVAL
static char_u *readfile_charconvert(char_u *fname, char_u *fenc, int *fdp);
#endif
#ifdef FEAT_VIMINFO
static void check_marks_read(void);
#endif
#ifdef FEAT_CRYPT
static char_u *check_for_cryptkey(char_u *cryptkey, char_u *ptr, long *sizep, off_T *filesizep, int newfile, char_u *fname, int *did_ask);
#endif
@@ -2855,25 +2852,6 @@ readfile_charconvert(
}
#endif
#ifdef FEAT_VIMINFO
/*
* Read marks for the current buffer from the viminfo file, when we support
* buffer marks and the buffer has a name.
*/
static void
check_marks_read(void)
{
if (!curbuf->b_marks_read && get_viminfo_parameter('\'') > 0
&& curbuf->b_ffname != NULL)
read_viminfo(NULL, VIF_WANT_MARKS);
/* Always set b_marks_read; needed when 'viminfo' is changed to include
* the ' parameter after opening a buffer. */
curbuf->b_marks_read = TRUE;
}
#endif
#if defined(FEAT_CRYPT) || defined(PROTO)
/*
* Check for magic number used for encryption. Applies to the current buffer.