diff options
author | Pablo Arias <pabloariasal@gmail.com> | 2023-12-25 01:30:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-25 08:30:56 +0800 |
commit | 2ff2785c396e66c285fecf5b151d8f8863f9d4e6 (patch) | |
tree | a5328e075c2ccf9c1013fcdb07b722a13ab14ede /src | |
parent | 675522af18f59918a64e6dbe5f0ba3b1d3b4eb65 (diff) | |
download | rneovim-2ff2785c396e66c285fecf5b151d8f8863f9d4e6.tar.gz rneovim-2ff2785c396e66c285fecf5b151d8f8863f9d4e6.tar.bz2 rneovim-2ff2785c396e66c285fecf5b151d8f8863f9d4e6.zip |
feat(health): checkhealth buffer can show in a split window (#26714)
:checkhealth now respects :vertical and :horizontal.
For example:
:vertical checkhealth foo bar
will open the healthcheck buffer in a vertical split.
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/eval.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 43aeda06ef..a1ac1de1df 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -8814,7 +8814,14 @@ void eval_fmt_source_name_line(char *buf, size_t bufsize) void ex_checkhealth(exarg_T *eap) { Error err = ERROR_INIT; - MAXSIZE_TEMP_ARRAY(args, 1); + MAXSIZE_TEMP_ARRAY(args, 2); + if (cmdmod.cmod_split & WSP_VERT) { + ADD_C(args, CSTR_AS_OBJ("vertical")); + } else if (cmdmod.cmod_split & WSP_HOR) { + ADD_C(args, CSTR_AS_OBJ("horizontal")); + } else { + ADD_C(args, CSTR_AS_OBJ("tab")); + } ADD_C(args, CSTR_AS_OBJ(eap->arg)); NLUA_EXEC_STATIC("return vim.health._check(...)", args, &err); if (!ERROR_SET(&err)) { |