parent
fc4dc93209
commit
c3e1bab9d6
|
@ -72,7 +72,7 @@ def -hidden c-family-insert-on-newline %[ eval -draft %[
|
|||
exec -save-regs '' k <a-x>1s^\h*(//+\h*)<ret> y
|
||||
try %[
|
||||
# if the previous comment isn't empty, create a new one
|
||||
exec <a-x><a-K>^\h*//+\h*$<ret> j<a-x>s^\h*<ret>p
|
||||
exec <a-x><a-K>^\h*//+\h*$<ret> j<a-x>s^\h*<ret>P
|
||||
] catch %[
|
||||
# if there is no text in the previous comment, remove it completely
|
||||
exec d
|
||||
|
|
1
test/regression/1074-comment-leader-autoinsert-error/cmd
Normal file
1
test/regression/1074-comment-leader-autoinsert-error/cmd
Normal file
|
@ -0,0 +1 @@
|
|||
i<ret><esc>
|
1
test/regression/1074-comment-leader-autoinsert-error/in
Normal file
1
test/regression/1074-comment-leader-autoinsert-error/in
Normal file
|
@ -0,0 +1 @@
|
|||
// abc%( )def
|
2
test/regression/1074-comment-leader-autoinsert-error/out
Normal file
2
test/regression/1074-comment-leader-autoinsert-error/out
Normal file
|
@ -0,0 +1,2 @@
|
|||
// abc
|
||||
// def
|
3
test/regression/1074-comment-leader-autoinsert-error/rc
Normal file
3
test/regression/1074-comment-leader-autoinsert-error/rc
Normal file
|
@ -0,0 +1,3 @@
|
|||
source "%val{runtime}/colors/default.kak"
|
||||
source "%val{runtime}/rc/core/c-family.kak"
|
||||
set buffer filetype cpp
|
Loading…
Reference in New Issue
Block a user