diff --git a/rc/detection/editorconfig.kak b/rc/detection/editorconfig.kak index c28e3696..0e78f7c5 100644 --- a/rc/detection/editorconfig.kak +++ b/rc/detection/editorconfig.kak @@ -47,7 +47,7 @@ define-command editorconfig-load -params ..1 -docstring "editorconfig-load [file print "set-option buffer BOM utf8" } if (trim_trailing_whitespace == "true") { - print "hook buffer BufWritePre \"" file "\" -group editorconfig-hooks %{ try %{ execute-keys -draft %{ %s\\h+$d } } }" + print "hook buffer BufWritePre \"" file "\" -group editorconfig-hooks %{ try %{ execute-keys -draft %{ %s\\h+$|\\n+\\zd } } }" } if (max_line_length && max_line_length != "off") { print "set window autowrap_column " max_line_length