From 84b02bf40758f1a5e52faa5fb8a7e62c3f38c03e Mon Sep 17 00:00:00 2001 From: Olivier Perret Date: Sat, 22 Oct 2016 10:19:19 +0200 Subject: [PATCH] fish.kak: fix edge cases in newline insertion --- rc/base/fish.kak | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rc/base/fish.kak b/rc/base/fish.kak index 3e2b844c..81c1dabc 100644 --- a/rc/base/fish.kak +++ b/rc/base/fish.kak @@ -56,18 +56,18 @@ def -hidden _fish_indent_on_new_line %{ # filter previous line try %{ exec -draft k:_fish_filter_around_selections } # indent after start structure - try %{ exec -draft kx^\h*(begin|case|else|for|function|if|switch|while)\bj } + try %{ exec -draft k^\h*(begin|case|else|for|function|if|switch|while)\bj } } } def -hidden _fish_insert_on_new_line %{ eval -no-hooks -draft -itersel %{ # copy _#_ comment prefix and following white spaces - try %{ exec -draft kxs^\h*\K#\h*yjp } + try %{ exec -draft ks^\h*\K#\h*yjp } # wisely add end structure eval -save-regs x %{ - try %{ exec -draft kxs^\h+"xy } catch %{ reg x '' } - try %{ exec -draft kx^x(begin|for|function|if|switch|while)jiXK^x(begin|for|function|if|switch|while).*\nxend$jxypjaend } + try %{ exec -draft ks^\h+"xy } catch %{ reg x '' } + try %{ exec -draft k^x(begin|for|function|if|switch|while)jiXK^x(begin|for|function|if|switch|while).*\nxend$jxypjaend } } } }