mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
refactor: move float_relative_str[] to nvim_win_get_config() (#26344)
It's only used in one place, as it's usually conveyed as non-string.
This commit is contained in:
parent
548f03c66c
commit
76a30f2bd0
@ -311,6 +311,9 @@ static Dictionary config_put_bordertext(Dictionary config, FloatConfig *fconfig,
|
|||||||
Dictionary nvim_win_get_config(Window window, Error *err)
|
Dictionary nvim_win_get_config(Window window, Error *err)
|
||||||
FUNC_API_SINCE(6)
|
FUNC_API_SINCE(6)
|
||||||
{
|
{
|
||||||
|
/// Keep in sync with FloatRelative in buffer_defs.h
|
||||||
|
static const char *const float_relative_str[] = { "editor", "win", "cursor", "mouse" };
|
||||||
|
|
||||||
Dictionary rv = ARRAY_DICT_INIT;
|
Dictionary rv = ARRAY_DICT_INIT;
|
||||||
|
|
||||||
win_T *wp = find_window_by_handle(window, err);
|
win_T *wp = find_window_by_handle(window, err);
|
||||||
|
@ -902,7 +902,7 @@ enum {
|
|||||||
kFloatAnchorSouth = 2,
|
kFloatAnchorSouth = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Keep in sync with float_relative_str in winfloat.h
|
/// Keep in sync with float_relative_str[] in nvim_win_get_config()
|
||||||
typedef enum {
|
typedef enum {
|
||||||
kFloatRelativeEditor = 0,
|
kFloatRelativeEditor = 0,
|
||||||
kFloatRelativeWindow = 1,
|
kFloatRelativeWindow = 1,
|
||||||
|
@ -10,10 +10,6 @@
|
|||||||
/// SE -> kFloatAnchorSouth | kFloatAnchorEast
|
/// SE -> kFloatAnchorSouth | kFloatAnchorEast
|
||||||
EXTERN const char *const float_anchor_str[] INIT( = { "NW", "NE", "SW", "SE" });
|
EXTERN const char *const float_anchor_str[] INIT( = { "NW", "NE", "SW", "SE" });
|
||||||
|
|
||||||
/// Keep in sync with FloatRelative in buffer_defs.h
|
|
||||||
EXTERN const char *const float_relative_str[]
|
|
||||||
INIT( = { "editor", "win", "cursor", "mouse" });
|
|
||||||
|
|
||||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||||
# include "winfloat.h.generated.h"
|
# include "winfloat.h.generated.h"
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user