mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.1.0826: too many #ifdefs
Problem: Too many #ifdefs.
Solution: Graduate FEAT_VIRTUALEDIT. Adds about 10Kbyte to the code.
29ddebef40
This commit is contained in:
parent
8bd194f98a
commit
e3d9945f7f
@ -2446,7 +2446,7 @@ void get_winopts(buf_T *buf)
|
||||
*/
|
||||
pos_T *buflist_findfpos(buf_T *buf)
|
||||
{
|
||||
static pos_T no_position = INIT_POS_T(1, 0, 0);
|
||||
static pos_T no_position = { 1, 0, 0 };
|
||||
|
||||
wininfo_T *wip = find_wininfo(buf, FALSE);
|
||||
return (wip == NULL) ? &no_position : &(wip->wi_fpos);
|
||||
|
@ -602,7 +602,7 @@ EXTERN bool can_si INIT(= false);
|
||||
EXTERN bool can_si_back INIT(= false);
|
||||
|
||||
// w_cursor before formatting text.
|
||||
EXTERN pos_T saved_cursor INIT(= INIT_POS_T(0, 0, 0));
|
||||
EXTERN pos_T saved_cursor INIT(= { 0, 0, 0 });
|
||||
|
||||
/*
|
||||
* Stuff for insert mode.
|
||||
@ -789,7 +789,7 @@ EXTERN int autocmd_bufnr INIT(= 0); // fnum for <abuf> on cmdline
|
||||
EXTERN char_u *autocmd_match INIT(= NULL); // name for <amatch> on cmdline
|
||||
EXTERN int did_cursorhold INIT(= false); // set when CursorHold t'gerd
|
||||
// for CursorMoved event
|
||||
EXTERN pos_T last_cursormoved INIT(= INIT_POS_T(0, 0, 0));
|
||||
EXTERN pos_T last_cursormoved INIT(= { 0, 0, 0 });
|
||||
|
||||
EXTERN int postponed_split INIT(= 0); /* for CTRL-W CTRL-] command */
|
||||
EXTERN int postponed_split_flags INIT(= 0); /* args for win_split() */
|
||||
|
@ -924,7 +924,7 @@ static void mark_adjust_internal(linenr_T line1, linenr_T line2,
|
||||
int i;
|
||||
int fnum = curbuf->b_fnum;
|
||||
linenr_T *lp;
|
||||
static pos_T initpos = INIT_POS_T(1, 0, 0);
|
||||
static pos_T initpos = { 1, 0, 0 };
|
||||
|
||||
if (line2 < line1 && amount_after == 0L) /* nothing to do */
|
||||
return;
|
||||
|
@ -5443,7 +5443,7 @@ static void nv_csearch(cmdarg_T *cap)
|
||||
*/
|
||||
static void nv_brackets(cmdarg_T *cap)
|
||||
{
|
||||
pos_T new_pos = INIT_POS_T(0, 0, 0);
|
||||
pos_T new_pos = { 0, 0, 0 };
|
||||
pos_T prev_pos;
|
||||
pos_T *pos = NULL; /* init for GCC */
|
||||
pos_T old_pos; /* cursor position before command */
|
||||
|
@ -24,7 +24,6 @@ typedef struct {
|
||||
colnr_T coladd;
|
||||
} pos_T;
|
||||
|
||||
# define INIT_POS_T(l, c, ca) {l, c, ca}
|
||||
|
||||
/*
|
||||
* Same, but without coladd.
|
||||
|
@ -109,7 +109,7 @@ static char_u *tagmatchname = NULL; /* name of last used tag */
|
||||
* Tag for preview window is remembered separately, to avoid messing up the
|
||||
* normal tagstack.
|
||||
*/
|
||||
static taggy_T ptag_entry = {NULL, {INIT_POS_T(0, 0, 0), 0, 0, NULL}, 0, 0};
|
||||
static taggy_T ptag_entry = { NULL, { { 0, 0, 0 }, 0, 0, NULL }, 0, 0 };
|
||||
|
||||
/*
|
||||
* Jump to tag; handling of tag commands and tag stack
|
||||
|
Loading…
Reference in New Issue
Block a user