Fix python comment copy logic in python.kak
And introduce the first unit test that sources bundled support scripts. Fixes #860
This commit is contained in:
parent
6bfc68d4f3
commit
5af29b0254
|
@ -60,8 +60,8 @@ def -hidden _python_indent_on_new_line %{
|
||||||
# cleanup trailing whitespaces from previous line
|
# cleanup trailing whitespaces from previous line
|
||||||
try %{ exec -draft k <a-x> s \h+$ <ret> d }
|
try %{ exec -draft k <a-x> s \h+$ <ret> d }
|
||||||
# copy '#' comment prefix and following white spaces
|
# copy '#' comment prefix and following white spaces
|
||||||
try %{ exec -draft k x s ^\h*\K#\h* <ret> y j p }
|
try %{ exec -draft k x s ^\h*#\h* <ret> y jgh P }
|
||||||
# indent after :
|
# indent after line ending with :
|
||||||
try %{ exec -draft <space> k x <a-k> :$ <ret> j <a-gt> }
|
try %{ exec -draft <space> k x <a-k> :$ <ret> j <a-gt> }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
1
share/kak/rc
Symbolic link
1
share/kak/rc
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../rc
|
1
test/regression/860-python-incorrect-commenting/cmd
Normal file
1
test/regression/860-python-incorrect-commenting/cmd
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<a-j>welc<ret><esc>
|
2
test/regression/860-python-incorrect-commenting/in
Normal file
2
test/regression/860-python-incorrect-commenting/in
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# comment
|
||||||
|
if haha
|
2
test/regression/860-python-incorrect-commenting/out
Normal file
2
test/regression/860-python-incorrect-commenting/out
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# comment
|
||||||
|
# if haha
|
4
test/regression/860-python-incorrect-commenting/rc
Normal file
4
test/regression/860-python-incorrect-commenting/rc
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
source "%val{runtime}/colors/default.kak"
|
||||||
|
source "%val{runtime}/rc/core/formatter.kak"
|
||||||
|
source "%val{runtime}/rc/core/python.kak"
|
||||||
|
set buffer filetype python
|
Loading…
Reference in New Issue
Block a user