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 vim/vim#4717)  Reorder code to make most functions static.

c3328169d5

735aa4c4c8 was the partial port for
the typedefs.
This patch completes the viminfo->shada port.

- get_shada_parameter()
- find_shada_parameter()

Other patches below are N/A.

vim-patch:8.1.1728: wrong place for command line history viminfo support

Problem:    Wrong place for command line history viminfo support.
Solution:   Move it to viminfo.c.

5f32ece459

vim-patch:8.1.1730: wrong place for mark viminfo support

Problem:    Wrong place for mark viminfo support.
Solution:   Move it to viminfo.c. (Yegappan Lakshmanan, closes vim/vim#4716)

1e78e69680

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
Jan Edmund Lazo
2025-07-17 22:19:00 -04:00
parent 6a97eb332a
commit b79ed66e4a
4 changed files with 49 additions and 48 deletions

View File

@@ -2049,20 +2049,6 @@ static char *readfile_charconvert(char *fname, char *fenc, int *fdp)
return tmpname;
}
/// Read marks for the current buffer from the ShaDa file, when we support
/// buffer marks and the buffer has a name.
static void check_marks_read(void)
{
if (!curbuf->b_marks_read && get_shada_parameter('\'') > 0
&& curbuf->b_ffname != NULL) {
shada_read_marks();
}
// Always set b_marks_read; needed when 'shada' is changed to include
// the ' parameter after opening a buffer.
curbuf->b_marks_read = true;
}
/// Set the name of the current buffer. Use when the buffer doesn't have a
/// name and a ":r" or ":w" command with a file name is used.
int set_rw_fname(char *fname, char *sfname)