mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
commit
19207762fd
@ -1517,6 +1517,7 @@ void free_buf_options(buf_T *buf, int free_p_ff)
|
|||||||
clear_string_option(&buf->b_p_qe);
|
clear_string_option(&buf->b_p_qe);
|
||||||
buf->b_p_ar = -1;
|
buf->b_p_ar = -1;
|
||||||
buf->b_p_ul = NO_LOCAL_UNDOLEVEL;
|
buf->b_p_ul = NO_LOCAL_UNDOLEVEL;
|
||||||
|
clear_string_option(&buf->b_p_lw);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -677,6 +677,7 @@ struct file_buffer {
|
|||||||
char_u *b_p_tsr; /* 'thesaurus' local value */
|
char_u *b_p_tsr; /* 'thesaurus' local value */
|
||||||
long b_p_ul; /* 'undolevels' local value */
|
long b_p_ul; /* 'undolevels' local value */
|
||||||
int b_p_udf; /* 'undofile' */
|
int b_p_udf; /* 'undofile' */
|
||||||
|
char_u *b_p_lw; // 'lispwords' local value
|
||||||
|
|
||||||
/* end of buffer options */
|
/* end of buffer options */
|
||||||
|
|
||||||
|
@ -690,7 +690,7 @@ static int lisp_match(char_u *p)
|
|||||||
{
|
{
|
||||||
char_u buf[LSIZE];
|
char_u buf[LSIZE];
|
||||||
int len;
|
int len;
|
||||||
char_u *word = p_lispwords;
|
char_u *word = *curbuf->b_p_lw != NUL ? curbuf->b_p_lw : p_lispwords;
|
||||||
|
|
||||||
while (*word != NUL) {
|
while (*word != NUL) {
|
||||||
(void)copy_option_part(&word, buf, LSIZE, ",");
|
(void)copy_option_part(&word, buf, LSIZE, ",");
|
||||||
|
@ -143,6 +143,7 @@
|
|||||||
# define PV_KMAP OPT_BUF(BV_KMAP)
|
# define PV_KMAP OPT_BUF(BV_KMAP)
|
||||||
#define PV_KP OPT_BOTH(OPT_BUF(BV_KP))
|
#define PV_KP OPT_BOTH(OPT_BUF(BV_KP))
|
||||||
# define PV_LISP OPT_BUF(BV_LISP)
|
# define PV_LISP OPT_BUF(BV_LISP)
|
||||||
|
# define PV_LW OPT_BOTH(OPT_BUF(BV_LW))
|
||||||
#define PV_MA OPT_BUF(BV_MA)
|
#define PV_MA OPT_BUF(BV_MA)
|
||||||
#define PV_ML OPT_BUF(BV_ML)
|
#define PV_ML OPT_BUF(BV_ML)
|
||||||
#define PV_MOD OPT_BUF(BV_MOD)
|
#define PV_MOD OPT_BUF(BV_MOD)
|
||||||
@ -1057,7 +1058,7 @@ static struct vimoption
|
|||||||
(char_u *)&p_lisp, PV_LISP,
|
(char_u *)&p_lisp, PV_LISP,
|
||||||
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
|
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
|
||||||
{"lispwords", "lw", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
|
{"lispwords", "lw", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
|
||||||
(char_u *)&p_lispwords, PV_NONE,
|
(char_u *)&p_lispwords, PV_LW,
|
||||||
{(char_u *)LISPWORD_VALUE, (char_u *)0L}
|
{(char_u *)LISPWORD_VALUE, (char_u *)0L}
|
||||||
SCRIPTID_INIT},
|
SCRIPTID_INIT},
|
||||||
{"list", NULL, P_BOOL|P_VI_DEF|P_RWIN,
|
{"list", NULL, P_BOOL|P_VI_DEF|P_RWIN,
|
||||||
@ -3558,6 +3559,7 @@ void check_buf_options(buf_T *buf)
|
|||||||
check_string_option(&buf->b_p_tags);
|
check_string_option(&buf->b_p_tags);
|
||||||
check_string_option(&buf->b_p_dict);
|
check_string_option(&buf->b_p_dict);
|
||||||
check_string_option(&buf->b_p_tsr);
|
check_string_option(&buf->b_p_tsr);
|
||||||
|
check_string_option(&buf->b_p_lw);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -6583,6 +6585,9 @@ void unset_global_local_option(char *name, void *from)
|
|||||||
case PV_UL:
|
case PV_UL:
|
||||||
buf->b_p_ul = NO_LOCAL_UNDOLEVEL;
|
buf->b_p_ul = NO_LOCAL_UNDOLEVEL;
|
||||||
break;
|
break;
|
||||||
|
case PV_LW:
|
||||||
|
clear_string_option(&buf->b_p_lw);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6612,6 +6617,7 @@ static char_u *get_varp_scope(struct vimoption *p, int opt_flags)
|
|||||||
case PV_TSR: return (char_u *)&(curbuf->b_p_tsr);
|
case PV_TSR: return (char_u *)&(curbuf->b_p_tsr);
|
||||||
case PV_STL: return (char_u *)&(curwin->w_p_stl);
|
case PV_STL: return (char_u *)&(curwin->w_p_stl);
|
||||||
case PV_UL: return (char_u *)&(curbuf->b_p_ul);
|
case PV_UL: return (char_u *)&(curbuf->b_p_ul);
|
||||||
|
case PV_LW: return (char_u *)&(curbuf->b_p_lw);
|
||||||
}
|
}
|
||||||
return NULL; /* "cannot happen" */
|
return NULL; /* "cannot happen" */
|
||||||
}
|
}
|
||||||
@ -6659,6 +6665,8 @@ static char_u *get_varp(struct vimoption *p)
|
|||||||
? (char_u *)&(curwin->w_p_stl) : p->var;
|
? (char_u *)&(curwin->w_p_stl) : p->var;
|
||||||
case PV_UL: return curbuf->b_p_ul != NO_LOCAL_UNDOLEVEL
|
case PV_UL: return curbuf->b_p_ul != NO_LOCAL_UNDOLEVEL
|
||||||
? (char_u *)&(curbuf->b_p_ul) : p->var;
|
? (char_u *)&(curbuf->b_p_ul) : p->var;
|
||||||
|
case PV_LW: return *curbuf->b_p_lw != NUL
|
||||||
|
? (char_u *)&(curbuf->b_p_lw) : p->var;
|
||||||
|
|
||||||
case PV_ARAB: return (char_u *)&(curwin->w_p_arab);
|
case PV_ARAB: return (char_u *)&(curwin->w_p_arab);
|
||||||
case PV_LIST: return (char_u *)&(curwin->w_p_list);
|
case PV_LIST: return (char_u *)&(curwin->w_p_list);
|
||||||
@ -7011,6 +7019,7 @@ void buf_copy_options(buf_T *buf, int flags)
|
|||||||
buf->b_p_tsr = empty_option;
|
buf->b_p_tsr = empty_option;
|
||||||
buf->b_p_qe = vim_strsave(p_qe);
|
buf->b_p_qe = vim_strsave(p_qe);
|
||||||
buf->b_p_udf = p_udf;
|
buf->b_p_udf = p_udf;
|
||||||
|
buf->b_p_lw = empty_option;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Don't copy the options set by ex_help(), use the saved values,
|
* Don't copy the options set by ex_help(), use the saved values,
|
||||||
|
@ -684,6 +684,7 @@ enum {
|
|||||||
, BV_KMAP
|
, BV_KMAP
|
||||||
, BV_KP
|
, BV_KP
|
||||||
, BV_LISP
|
, BV_LISP
|
||||||
|
, BV_LW
|
||||||
, BV_MA
|
, BV_MA
|
||||||
, BV_ML
|
, BV_ML
|
||||||
, BV_MOD
|
, BV_MOD
|
||||||
|
@ -37,6 +37,14 @@ STARTTEST
|
|||||||
:call UndoLevel()
|
:call UndoLevel()
|
||||||
:%w >> test.out
|
:%w >> test.out
|
||||||
:"sleep 10
|
:"sleep 10
|
||||||
|
:"
|
||||||
|
:" Testing 'lispwords'
|
||||||
|
:"
|
||||||
|
:setglobal lispwords=foo,bar,baz
|
||||||
|
:setlocal lispwords-=foo | setlocal lispwords+=quux
|
||||||
|
:redir >> test.out | echon "\nTesting 'lispwords' local value" | setglobal lispwords? | setlocal lispwords? | echo &lispwords . "\n" | redir end
|
||||||
|
:setlocal lispwords<
|
||||||
|
:redir >> test.out | echon "\nTesting 'lispwords' value reset" | setglobal lispwords? | setlocal lispwords? | echo &lispwords . "\n" | redir end
|
||||||
:qa!
|
:qa!
|
||||||
ENDTEST
|
ENDTEST
|
||||||
|
|
||||||
|
@ -39,3 +39,13 @@ THREE: expecting global undolevels: 50, local undolevels: -123456 (default)
|
|||||||
|
|
||||||
undolevels=50 global
|
undolevels=50 global
|
||||||
undolevels=-123456 local
|
undolevels=-123456 local
|
||||||
|
|
||||||
|
Testing 'lispwords' local value
|
||||||
|
lispwords=foo,bar,baz
|
||||||
|
lispwords=bar,baz,quux
|
||||||
|
bar,baz,quux
|
||||||
|
|
||||||
|
Testing 'lispwords' value reset
|
||||||
|
lispwords=foo,bar,baz
|
||||||
|
lispwords=foo,bar,baz
|
||||||
|
foo,bar,baz
|
||||||
|
@ -348,7 +348,7 @@ static int included_patches[] = {
|
|||||||
204,
|
204,
|
||||||
203,
|
203,
|
||||||
//202,
|
//202,
|
||||||
//201,
|
201,
|
||||||
//200,
|
//200,
|
||||||
199,
|
199,
|
||||||
//198,
|
//198,
|
||||||
|
Loading…
Reference in New Issue
Block a user