feat(option): custom chars in 'winborder' #33772

Problem: winborder option only supported predefined styles and lacked support for custom border characters.

Solution: implement parsing for comma-separated list format that allows specifying 8 individual border characters (topleft, top, topright, right, botright, bottom, botleft, left).
This commit is contained in:
glepnir
2025-07-10 09:15:08 +08:00
committed by GitHub
parent 7526fb449d
commit fb0dc825e9
8 changed files with 100 additions and 12 deletions

View File

@@ -4,6 +4,7 @@
#include <string.h>
#include "nvim/api/private/defs.h"
#include "nvim/api/win_config.h"
#include "nvim/ascii_defs.h"
#include "nvim/autocmd.h"
#include "nvim/buffer_defs.h"
@@ -2101,6 +2102,19 @@ const char *did_set_winbar(optset_T *args)
return did_set_statustabline_rulerformat(args, false, false);
}
/// The 'winborder' option is changed.
const char *did_set_winborder(optset_T *args)
{
WinConfig fconfig = WIN_CONFIG_INIT;
Error err = ERROR_INIT;
if (!parse_winborder(&fconfig, &err)) {
api_clear_error(&err);
return e_invarg;
}
api_clear_error(&err);
return NULL;
}
/// The 'winhighlight' option is changed.
const char *did_set_winhighlight(optset_T *args)
{