From ce18ac991820922f49f755d368e4616b30cbb6e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Kruszewski?= Date: Mon, 15 Aug 2022 13:41:07 +0200 Subject: [PATCH] VHDL filetype: Fix if statement behavior. --- rc/filetype/vhdl.kak | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rc/filetype/vhdl.kak b/rc/filetype/vhdl.kak index bceab2f2..05a2e933 100644 --- a/rc/filetype/vhdl.kak +++ b/rc/filetype/vhdl.kak @@ -182,7 +182,7 @@ define-command -hidden vhdl-insert-on-new-line %[ evaluate-commands %[ try %[ # Validate previous line and that it is not closed yet. - execute-keys -draft kx ^\h*(?i)((then|(.*:\h*)?if\b.*\bthen)$) j}ijx ^x(?i)end\b + execute-keys -draft kx ^\h*(?i)((then|(.*:\h*)?if\b.*\bthen)$) j}ijx ^x(?i)(elsif|else|end)\b # Don't add for "if ... generate", it requires "end generate;". execute-keys -draft kx (?i)\bgenerate\b execute-keys -draft oxendif @@ -191,7 +191,7 @@ define-command -hidden vhdl-insert-on-new-line %[ # Wisely add "end generate;". evaluate-commands %[ try %[ - execute-keys -draft kx ^\h*(?i).*\bgenerate$ j}ijx ^x(?i)(begin|end|else)\b + execute-keys -draft kx ^\h*(?i).*\bgenerate$ j}ijx ^x(?i)(begin|elsif|else|end)\b # Don't add in case of comment line. execute-keys -draft kx ^\h*-- execute-keys -draft oxendgenerate