modeline-parse: parse set
and :
correctly
When `set` or `se` is found at the start of the modeline, it should stop parsing options after `:`. When `modeline-parse` is called in the following file, it should _not_ recognize `tabstop=4` and `invalid_option=3`. ``` # kak: set indentwidth=0 tabstop=16: tabstop=4 invalid_option=3 ``` More info: http://vimdoc.sourceforge.net/htmldoc/options.html#modeline
This commit is contained in:
parent
f68e8313b2
commit
74874aa4b7
|
@ -88,7 +88,7 @@ define-command -hidden modeline-parse-impl %{
|
|||
# More info: http://vimdoc.sourceforge.net/htmldoc/options.html#modeline
|
||||
printf %s "${kak_selection}" | sed \
|
||||
-e 's/^[^:]\{1,\}://' \
|
||||
-e 's/[ \t]*set\{0,1\}[ \t]//' \
|
||||
-e 's/[ \t]*set\{0,1\}[ \t]\([^:]*\).*$/\1/' \
|
||||
-e 's/:[^a-zA-Z0-9_=-]*$//' \
|
||||
-e 's/:/ /g' \
|
||||
| tr ' ' '\n' \
|
||||
|
|
Loading…
Reference in New Issue
Block a user