From de214d262c2dff13974e4905fbb6a2dc89526736 Mon Sep 17 00:00:00 2001 From: John Isom Date: Mon, 27 Jul 2020 12:15:11 -0600 Subject: [PATCH] Update rust brace deindenting to handle bad indentation edge case --- rc/filetype/rust.kak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc/filetype/rust.kak b/rc/filetype/rust.kak index 4b393213..a5f05da2 100644 --- a/rc/filetype/rust.kak +++ b/rc/filetype/rust.kak @@ -113,7 +113,7 @@ define-command -hidden rust-indent-on-new-line %~ # dedent after lines starting with . and ending with , or ; try %_ execute-keys -draft k ^\h*\..*[,]\h*$ j _ # deindent closing brace(s) when after cursor - try %< execute-keys -draft ^\h*[})]+\h*$ > + try %< execute-keys -draft ^\h*[})]+\h*$ hm 1 > # todo dedent additional unmatched parenthesis # try %& execute-keys -draft k s \((?:[^)(]+|\((?:[^)(]+|\([^)(]*\))*\))*\) l Gl s\) %sh{ # count previous selections length