annotate src/proto/buffer.pro @ 17458:cfdef48743ed v8.1.1727

patch 8.1.1727: code for viminfo support is spread out commit https://github.com/vim/vim/commit/defa067c54874dd987121dd7252c62755e0aebfa Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 21 19:25:37 2019 +0200 patch 8.1.1727: code for viminfo support is spread out Problem: Code for viminfo support is spread out. Solution: Move to code to viminfo.c. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/4686)
author Bram Moolenaar <Bram@vim.org>
date Sun, 21 Jul 2019 19:30:06 +0200
parents 09fa437d33d8
children 4a3dca734d36
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 /* buffer.c */
17225
09fa437d33d8 patch 8.1.1612: cannot show an existing buffer in a popup window
Bram Moolenaar <Bram@vim.org>
parents: 17151
diff changeset
2 void buffer_ensure_loaded(buf_T *buf);
7668
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
3 int open_buffer(int read_stdin, exarg_T *eap, int flags);
9475
4d8f7f8da90c commit https://github.com/vim/vim/commit/b25f9a97e9aad3cbb4bc3fe87cdbd5700f8aa0c6
Christian Brabandt <cb@256bit.org>
parents: 7668
diff changeset
4 void set_bufref(bufref_T *bufref, buf_T *buf);
4d8f7f8da90c commit https://github.com/vim/vim/commit/b25f9a97e9aad3cbb4bc3fe87cdbd5700f8aa0c6
Christian Brabandt <cb@256bit.org>
parents: 7668
diff changeset
5 int bufref_valid(bufref_T *bufref);
7668
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
6 int buf_valid(buf_T *buf);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
7 void close_buffer(win_T *win, buf_T *buf, int action, int abort_if_last);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
8 void buf_clear_file(buf_T *buf);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
9 void buf_freeall(buf_T *buf, int flags);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
10 void goto_buffer(exarg_T *eap, int start, int dir, int count);
9487
69ed2c9d34a6 commit https://github.com/vim/vim/commit/7c0a2f367f2507669560b1a66423155c70d2e75b
Christian Brabandt <cb@256bit.org>
parents: 9475
diff changeset
11 void handle_swap_exists(bufref_T *old_curbuf);
15470
55ccc2d353bd patch 8.1.0743: giving error messages is not flexible
Bram Moolenaar <Bram@vim.org>
parents: 15330
diff changeset
12 char *do_bufdel(int command, char_u *arg, int addr_count, int start_bnr, int end_bnr, int forceit);
7668
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
13 int do_buffer(int action, int start, int dir, int count, int forceit);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
14 void set_curbuf(buf_T *buf, int action);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
15 void enter_buffer(buf_T *buf);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
16 void do_autochdir(void);
12146
59c1e09cf1a9 patch 8.0.0953: get "no write since last change" error in terminal window
Christian Brabandt <cb@256bit.org>
parents: 11959
diff changeset
17 void no_write_message(void);
13302
b5806be0b36d patch 8.0.1525: using :wqa exits even if a job runs in a terminal window
Christian Brabandt <cb@256bit.org>
parents: 12146
diff changeset
18 void no_write_message_nobang(buf_T *buf);
13782
3be5e8306a3e patch 8.0.1763: :argedit does not reuse an empty unnamed buffer
Christian Brabandt <cb@256bit.org>
parents: 13302
diff changeset
19 int curbuf_reusable(void);
15195
16b2f2db6f28 patch 8.1.0607: proto files are not in sync with the source code
Bram Moolenaar <Bram@vim.org>
parents: 14433
diff changeset
20 buf_T *buflist_new(char_u *ffname_arg, char_u *sfname_arg, linenr_T lnum, int flags);
7668
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
21 void free_buf_options(buf_T *buf, int free_p_ff);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
22 int buflist_getfile(int n, linenr_T lnum, int options, int forceit);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
23 void buflist_getfpos(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
24 buf_T *buflist_findname_exp(char_u *fname);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
25 buf_T *buflist_findname(char_u *ffname);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
26 int buflist_findpat(char_u *pattern, char_u *pattern_end, int unlisted, int diffmode, int curtab_only);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
27 int ExpandBufnames(char_u *pat, int *num_file, char_u ***file, int options);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
28 buf_T *buflist_findnr(int nr);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
29 char_u *buflist_nr2name(int n, int fullname, int helptail);
17458
cfdef48743ed patch 8.1.1727: code for viminfo support is spread out
Bram Moolenaar <Bram@vim.org>
parents: 17225
diff changeset
30 void buflist_setfpos(buf_T *buf, win_T *win, linenr_T lnum, colnr_T col, int copy_options);
7668
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
31 void get_winopts(buf_T *buf);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
32 pos_T *buflist_findfpos(buf_T *buf);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
33 linenr_T buflist_findlnum(buf_T *buf);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
34 void buflist_list(exarg_T *eap);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
35 int buflist_name_nr(int fnum, char_u **fname, linenr_T *lnum);
15195
16b2f2db6f28 patch 8.1.0607: proto files are not in sync with the source code
Bram Moolenaar <Bram@vim.org>
parents: 14433
diff changeset
36 int setfname(buf_T *buf, char_u *ffname_arg, char_u *sfname_arg, int message);
7668
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
37 void buf_set_name(int fnum, char_u *name);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
38 void buf_name_changed(buf_T *buf);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
39 buf_T *setaltfname(char_u *ffname, char_u *sfname, linenr_T lnum);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
40 char_u *getaltfname(int errmsg);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
41 int buflist_add(char_u *fname, int flags);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
42 void buflist_slash_adjust(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
43 void buflist_altfpos(win_T *win);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
44 int otherfile(char_u *ffname);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
45 void buf_setino(buf_T *buf);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
46 void fileinfo(int fullname, int shorthelp, int dont_truncate);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
47 void col_print(char_u *buf, size_t buflen, int col, int vcol);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
48 void maketitle(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
49 void resettitle(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
50 void free_titles(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
51 int build_stl_str_hl(win_T *wp, char_u *out, size_t outlen, char_u *fmt, int use_sandbox, int fillchar, int maxwidth, struct stl_hlrec *hltab, struct stl_hlrec *tabtab);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
52 void get_rel_pos(win_T *wp, char_u *buf, int buflen);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
53 char_u *fix_fname(char_u *fname);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
54 void fname_expand(buf_T *buf, char_u **ffname, char_u **sfname);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
55 char_u *alist_name(aentry_T *aep);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
56 void do_arg_all(int count, int forceit, int keep_tabs);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
57 void ex_buffer_all(exarg_T *eap);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
58 void do_modelines(int flags);
14433
4a94173743d9 patch 8.1.0230: directly checking 'buftype' value
Christian Brabandt <cb@256bit.org>
parents: 14019
diff changeset
59 int bt_normal(buf_T *buf);
11788
77bf0346687e patch 8.0.0776: function prototypes missing without the quickfix feature
Christian Brabandt <cb@256bit.org>
parents: 9487
diff changeset
60 int bt_quickfix(buf_T *buf);
77bf0346687e patch 8.0.0776: function prototypes missing without the quickfix feature
Christian Brabandt <cb@256bit.org>
parents: 9487
diff changeset
61 int bt_terminal(buf_T *buf);
11800
5ceaecedbad2 patch 8.0.0782: using freed memory in quickfix code
Christian Brabandt <cb@256bit.org>
parents: 11788
diff changeset
62 int bt_help(buf_T *buf);
14019
dc67449d648c patch 8.1.0027: difficult to make a plugin that feeds a line to a job
Christian Brabandt <cb@256bit.org>
parents: 13782
diff changeset
63 int bt_prompt(buf_T *buf);
16778
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 15470
diff changeset
64 int bt_popup(buf_T *buf);
17095
10e0d7d96cb0 patch 8.1.1547: functionality of bt_nofile() is confusing
Bram Moolenaar <Bram@vim.org>
parents: 16778
diff changeset
65 int bt_nofilename(buf_T *buf);
11788
77bf0346687e patch 8.0.0776: function prototypes missing without the quickfix feature
Christian Brabandt <cb@256bit.org>
parents: 9487
diff changeset
66 int bt_nofile(buf_T *buf);
77bf0346687e patch 8.0.0776: function prototypes missing without the quickfix feature
Christian Brabandt <cb@256bit.org>
parents: 9487
diff changeset
67 int bt_dontwrite(buf_T *buf);
77bf0346687e patch 8.0.0776: function prototypes missing without the quickfix feature
Christian Brabandt <cb@256bit.org>
parents: 9487
diff changeset
68 int bt_dontwrite_msg(buf_T *buf);
77bf0346687e patch 8.0.0776: function prototypes missing without the quickfix feature
Christian Brabandt <cb@256bit.org>
parents: 9487
diff changeset
69 int buf_hide(buf_T *buf);
7668
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
70 char_u *buf_spname(buf_T *buf);
11959
91a26b7a4119 patch 8.0.0860: side effects when channel appends to a buffer
Christian Brabandt <cb@256bit.org>
parents: 11800
diff changeset
71 void switch_to_win_for_buf(buf_T *buf, win_T **save_curwinp, tabpage_T **save_curtabp, bufref_T *save_curbuf);
91a26b7a4119 patch 8.0.0860: side effects when channel appends to a buffer
Christian Brabandt <cb@256bit.org>
parents: 11800
diff changeset
72 void restore_win_for_buf(win_T *save_curwin, tabpage_T *save_curtab, bufref_T *save_curbuf);
7668
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
73 int find_win_for_buf(buf_T *buf, win_T **wp, tabpage_T **tp);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
74 void set_buflisted(int on);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
75 int buf_contents_changed(buf_T *buf);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 5202
diff changeset
76 void wipe_buffer(buf_T *buf, int aucmd);
17151
ebe9aab81898 patch 8.1.1575: callbacks may be garbage collected
Bram Moolenaar <Bram@vim.org>
parents: 17095
diff changeset
77 int set_ref_in_buffers(int copyID);
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 /* vim: set ft=c : */