This commit makes `:modeline-parse` grab all lines that look like
modelines, and lets the parser deal with invalid formats.
This allows actually printing an error on unsupported modelines
formats, instead of ignoring them upfront.
This commit prevents specially crafted modelines from making the
editor execute arbitrary Kakoune commands.
By using a tabulation character as a separator, commands can be
injected in the value of the options listed in the modeline. For
example:
# kak: tabstop=2;set-option buffer pwned yes
Fixes#3735.
This commit addresses an off-by-one error that selected `modelines`+1
lines when looking for modelines in a buffer.
Note that setting `modelines` to 0 will still select one line.
Fixes#3733.
This fixes serveral shortcomings of the current implementation:
- valid recipt definitions eg
foo bar="quz":
where previously interrupted by justfile/double_string
and therefore they where not highlighted correctly
- global variable assignments where not captured at all
I dedicate any and all copyright interest in this software to the
public domain. I make this dedication for the benefit of the public at
large and to the detriment of my heirs and successors. I intend this
dedication to be an overt act of relinquishment in perpetuity of all
present and future rights to this software under copyright law.
I dedicate any and all copyright interest in this software to the
public domain. I make this dedication for the benefit of the public at
large and to the detriment of my heirs and successors. I intend this
dedication to be an overt act of relinquishment in perpetuity of all
present and future rights to this software under copyright law.
Add support for the following gopls commands:
- format
- imports
- definition
- references
Thanks krobelus@ and lenormf@ for their review and suggestions.
I dedicate any and all copyright interest in this software to the
public domain. I make this dedication for the benefit of the public at
large and to the detriment of my heirs and successors. I intend this
dedication to be an overt act of relinquishment in perpetuity of all
present and future rights to this software under copyright law.
I dedicate any and all copyright interest in this software to the
public domain. I make this dedication for the benefit of the public at
large and to the detriment of my heirs and successors. I intend this
dedication to be an overt act of relinquishment in perpetuity of all
present and future rights to this software under copyright law.
I dedicate any and all copyright interest in this software to the
public domain. I make this dedication for the benefit of the public at
large and to the detriment of my heirs and successors. I intend this
dedication to be an overt act of relinquishment in perpetuity of all
present and future rights to this software under copyright law.
I dedicate any and all copyright interest in this software to the
public domain. I make this dedication for the benefit of the public at
large and to the detriment of my heirs and successors. I intend this
dedication to be an overt act of relinquishment in perpetuity of all
present and future rights to this software under copyright law.
This adds two things I forgot in
9a7d8df4 (Avoid accidentally using environment variables in sh scopes)
Mea culpa, the problem was that I was skipping matches with "filetype"
because that's usually just a hook parameter as in "WinSetOption filetype=.."
rg --pcre2 '\b(?!filetype=)\w+=' rc/
So I missed these two cases where a shell variable is actually called "filetype".
The one in git.kak was not a problem because show_git_cmd_output is only
ever called with sane inputs. However, file.kak does use the filetype
environment variable for many mime types, for example:
filetype=somefiletype\''; echo -debug injection; nop '\' kak /dev/null
Will run the echo since /dev/null has mime type "inode/chardevice"