mirror of
https://github.com/neovim/neovim.git
synced 2025-10-14 13:56:05 +00:00
Merge pull request #25214 from bfredl/glyphcache
refactor(grid): change schar_T representation to be more compact
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
#include "nvim/drawscreen.h"
|
||||
#include "nvim/extmark_defs.h"
|
||||
#include "nvim/globals.h"
|
||||
#include "nvim/grid_defs.h"
|
||||
#include "nvim/grid.h"
|
||||
#include "nvim/highlight_group.h"
|
||||
#include "nvim/macros.h"
|
||||
#include "nvim/mbyte.h"
|
||||
@@ -350,7 +350,7 @@ Dictionary nvim_win_get_config(Window window, Error *err)
|
||||
for (size_t i = 0; i < 8; i++) {
|
||||
Array tuple = ARRAY_DICT_INIT;
|
||||
|
||||
String s = cstrn_to_string(config->border_chars[i], sizeof(schar_T));
|
||||
String s = cstrn_to_string(config->border_chars[i], MAX_SCHAR_SIZE);
|
||||
|
||||
int hi_id = config->border_hl_ids[i];
|
||||
char *hi_name = syn_id2name(hi_id);
|
||||
@@ -522,7 +522,7 @@ static void parse_border_style(Object style, FloatConfig *fconfig, Error *err)
|
||||
{
|
||||
struct {
|
||||
const char *name;
|
||||
schar_T chars[8];
|
||||
char chars[8][MAX_SCHAR_SIZE];
|
||||
bool shadow_color;
|
||||
} defaults[] = {
|
||||
{ "double", { "╔", "═", "╗", "║", "╝", "═", "╚", "║" }, false },
|
||||
@@ -533,7 +533,7 @@ static void parse_border_style(Object style, FloatConfig *fconfig, Error *err)
|
||||
{ NULL, { { NUL } }, false },
|
||||
};
|
||||
|
||||
schar_T *chars = fconfig->border_chars;
|
||||
char (*chars)[MAX_SCHAR_SIZE] = fconfig->border_chars;
|
||||
int *hl_ids = fconfig->border_hl_ids;
|
||||
|
||||
fconfig->border = true;
|
||||
|
Reference in New Issue
Block a user