aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/buffer.c
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2024-03-09 15:00:41 -0700
committerJosh Rahm <joshuarahm@gmail.com>2024-03-09 15:00:41 -0700
commit7a7f497b483cd65e340064f23ed1c73425ecba0a (patch)
treed5c99ea22a1e10300d06165f8ac96df6b0dc59e1 /src/nvim/eval/buffer.c
parent1b7b916b7631ddf73c38e3a0070d64e4636cb2f3 (diff)
parentade1b12f49c3b3914c74847d791eb90ea90b56b7 (diff)
downloadrneovim-7a7f497b483cd65e340064f23ed1c73425ecba0a.tar.gz
rneovim-7a7f497b483cd65e340064f23ed1c73425ecba0a.tar.bz2
rneovim-7a7f497b483cd65e340064f23ed1c73425ecba0a.zip
Merge remote-tracking branch 'upstream/master' into aucmd_textputpost
Diffstat (limited to 'src/nvim/eval/buffer.c')
-rw-r--r--src/nvim/eval/buffer.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/nvim/eval/buffer.c b/src/nvim/eval/buffer.c
index c60a104381..7b8f71ef3f 100644
--- a/src/nvim/eval/buffer.c
+++ b/src/nvim/eval/buffer.c
@@ -5,6 +5,7 @@
#include "nvim/ascii_defs.h"
#include "nvim/autocmd.h"
+#include "nvim/autocmd_defs.h"
#include "nvim/buffer.h"
#include "nvim/buffer_defs.h"
#include "nvim/change.h"
@@ -14,7 +15,6 @@
#include "nvim/eval/funcs.h"
#include "nvim/eval/typval.h"
#include "nvim/eval/typval_defs.h"
-#include "nvim/func_attr.h"
#include "nvim/globals.h"
#include "nvim/macros_defs.h"
#include "nvim/memline.h"
@@ -494,6 +494,7 @@ static dict_T *get_buffer_info(buf_T *buf)
tv_dict_add_nr(dict, S_LEN("changed"), bufIsChanged(buf));
tv_dict_add_nr(dict, S_LEN("changedtick"), buf_get_changedtick(buf));
tv_dict_add_nr(dict, S_LEN("hidden"), buf->b_ml.ml_mfp != NULL && buf->b_nwindows == 0);
+ tv_dict_add_nr(dict, S_LEN("command"), buf == cmdwin_buf);
// Get a reference to buffer variables
tv_dict_add_dict(dict, S_LEN("variables"), buf->b_vars);
@@ -507,7 +508,7 @@ static dict_T *get_buffer_info(buf_T *buf)
}
tv_dict_add_list(dict, S_LEN("windows"), windows);
- if (buf->b_signs) {
+ if (buf_has_signs(buf)) {
// List of signs placed in this buffer
tv_dict_add_list(dict, S_LEN("signs"), get_buffer_signs(buf));
}
@@ -584,7 +585,8 @@ void f_getbufinfo(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
///
/// @return range (from start to end) of lines in rettv from the specified
/// buffer.
-static void get_buffer_lines(buf_T *buf, linenr_T start, linenr_T end, int retlist, typval_T *rettv)
+static void get_buffer_lines(buf_T *buf, linenr_T start, linenr_T end, bool retlist,
+ typval_T *rettv)
{
rettv->v_type = (retlist ? VAR_LIST : VAR_STRING);
rettv->vval.v_string = NULL;