diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-10-13 00:13:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-13 00:13:39 +0200 |
commit | 51937e1322de0e4348c217947c117f54f3c664c3 (patch) | |
tree | 65be4944976933d8c096cff724c10636b7c102b2 /src/nvim/buffer.c | |
parent | e9fd1244b799ab4fc79cc734e780aceaa79c4a04 (diff) | |
parent | 6b7faf22f4c2a7cdfeae5a8bd72674252a7740d7 (diff) | |
download | rneovim-51937e1322de0e4348c217947c117f54f3c664c3.tar.gz rneovim-51937e1322de0e4348c217947c117f54f3c664c3.tar.bz2 rneovim-51937e1322de0e4348c217947c117f54f3c664c3.zip |
Merge #5470 from justinmk/pr5445
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 43 |
1 files changed, 19 insertions, 24 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index b42ad1c18a..5fb011885e 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -276,30 +276,25 @@ bool buf_valid(buf_T *buf) return false; } -/* - * Close the link to a buffer. - * "action" is used when there is no longer a window for the buffer. - * It can be: - * 0 buffer becomes hidden - * DOBUF_UNLOAD buffer is unloaded - * DOBUF_DELETE buffer is unloaded and removed from buffer list - * DOBUF_WIPE buffer is unloaded and really deleted - * When doing all but the first one on the current buffer, the caller should - * get a new buffer very soon! - * - * The 'bufhidden' option can force freeing and deleting. - * - * When "abort_if_last" is TRUE then do not close the buffer if autocommands - * cause there to be only one window with this buffer. e.g. when ":quit" is - * supposed to close the window but autocommands close all other windows. - */ -void -close_buffer ( - win_T *win, /* if not NULL, set b_last_cursor */ - buf_T *buf, - int action, - int abort_if_last -) +/// Close the link to a buffer. +/// +/// @param win If not NULL, set b_last_cursor. +/// @param buf +/// @param action Used when there is no longer a window for the buffer. +/// Possible values: +/// 0 buffer becomes hidden +/// DOBUF_UNLOAD buffer is unloaded +/// DOBUF_DELETE buffer is unloaded and removed from buffer list +/// DOBUF_WIPE buffer is unloaded and really deleted +/// When doing all but the first one on the current buffer, the +/// caller should get a new buffer very soon! +/// The 'bufhidden' option can force freeing and deleting. +/// @param abort_if_last +/// If TRUE, do not close the buffer if autocommands cause +/// there to be only one window with this buffer. e.g. when +/// ":quit" is supposed to close the window but autocommands +/// close all other windows. +void close_buffer(win_T *win, buf_T *buf, int action, int abort_if_last) { bool unload_buf = (action != 0); bool del_buf = (action == DOBUF_DEL || action == DOBUF_WIPE); |