rc markdown: fix loading language highlighter module given multiple code blocks
After opening a markdown file ```b ``` ```c int main() {} ``` markdown-load-languages will run an "evaluate-commands -itersel". The first selection makes us run "require-module b", which fails because that module can't be found. Since -itersel only ignores the "no selection remaining" error we fail to run "require-module c". Fix this by ignoring errors.
This commit is contained in:
parent
b633b6f9c3
commit
9d362b8b3e
|
@ -124,7 +124,7 @@ define-command -hidden markdown-indent-on-new-line %{
|
||||||
define-command -hidden markdown-load-languages %{
|
define-command -hidden markdown-load-languages %{
|
||||||
evaluate-commands -draft %{ try %{
|
evaluate-commands -draft %{ try %{
|
||||||
execute-keys 'gtGbGls```\h*\{?[.=]?\K[^}\s]+<ret>'
|
execute-keys 'gtGbGls```\h*\{?[.=]?\K[^}\s]+<ret>'
|
||||||
evaluate-commands -itersel %{ require-module %val{selection} }
|
evaluate-commands -itersel %{ try %{ require-module %val{selection} } }
|
||||||
}}
|
}}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user