forked from aniani/vim
updated for version 7.4.201
Problem: 'lispwords' is a global option. Solution: Make 'lispwords' global-local. (Sung Pae)
This commit is contained in:
21
src/option.c
21
src/option.c
@@ -134,6 +134,7 @@
|
||||
#define PV_KP OPT_BOTH(OPT_BUF(BV_KP))
|
||||
#ifdef FEAT_LISP
|
||||
# define PV_LISP OPT_BUF(BV_LISP)
|
||||
# define PV_LW OPT_BOTH(OPT_BUF(BV_LW))
|
||||
#endif
|
||||
#define PV_MA OPT_BUF(BV_MA)
|
||||
#define PV_ML OPT_BUF(BV_ML)
|
||||
@@ -1718,7 +1719,7 @@ static struct vimoption
|
||||
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
|
||||
{"lispwords", "lw", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
|
||||
#ifdef FEAT_LISP
|
||||
(char_u *)&p_lispwords, PV_NONE,
|
||||
(char_u *)&p_lispwords, PV_LW,
|
||||
{(char_u *)LISPWORD_VALUE, (char_u *)0L}
|
||||
#else
|
||||
(char_u *)NULL, PV_NONE,
|
||||
@@ -5412,6 +5413,9 @@ check_buf_options(buf)
|
||||
check_string_option(&buf->b_p_dict);
|
||||
check_string_option(&buf->b_p_tsr);
|
||||
#endif
|
||||
#ifdef FEAT_LISP
|
||||
check_string_option(&buf->b_p_lw);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -9879,6 +9883,11 @@ unset_global_local_option(name, from)
|
||||
case PV_UL:
|
||||
buf->b_p_ul = NO_LOCAL_UNDOLEVEL;
|
||||
break;
|
||||
#ifdef FEAT_LISP
|
||||
case PV_LW:
|
||||
clear_string_option(&buf->b_p_lw);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9928,6 +9937,9 @@ get_varp_scope(p, opt_flags)
|
||||
case PV_STL: return (char_u *)&(curwin->w_p_stl);
|
||||
#endif
|
||||
case PV_UL: return (char_u *)&(curbuf->b_p_ul);
|
||||
#ifdef FEAT_LISP
|
||||
case PV_LW: return (char_u *)&(curbuf->b_p_lw);
|
||||
#endif
|
||||
}
|
||||
return NULL; /* "cannot happen" */
|
||||
}
|
||||
@@ -9994,6 +10006,10 @@ get_varp(p)
|
||||
#endif
|
||||
case PV_UL: return curbuf->b_p_ul != NO_LOCAL_UNDOLEVEL
|
||||
? (char_u *)&(curbuf->b_p_ul) : p->var;
|
||||
#ifdef FEAT_LISP
|
||||
case PV_LW: return *curbuf->b_p_lw != NUL
|
||||
? (char_u *)&(curbuf->b_p_lw) : p->var;
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_ARABIC
|
||||
case PV_ARAB: return (char_u *)&(curwin->w_p_arab);
|
||||
@@ -10567,6 +10583,9 @@ buf_copy_options(buf, flags)
|
||||
#ifdef FEAT_PERSISTENT_UNDO
|
||||
buf->b_p_udf = p_udf;
|
||||
#endif
|
||||
#ifdef FEAT_LISP
|
||||
buf->b_p_lw = empty_option;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Don't copy the options set by ex_help(), use the saved values,
|
||||
|
||||
Reference in New Issue
Block a user