1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-23 15:23:29 +03:00

Merge remote-tracking branch 'c7skasku/fix-c-comments-whitespace'

This commit is contained in:
Maxime Coste 2022-02-15 20:45:40 +11:00
commit b6a9fd6e3a

View File

@ -151,6 +151,9 @@ define-command -hidden c-family-insert-on-newline %[ evaluate-commands -itersel
execute-keys d execute-keys d
] ]
] ]
# trim trailing whitespace on the previous line
try %[ execute-keys -draft k <a-x> s\h+$<ret> d ]
] ]
try %[ try %[
# if the previous line isn't within a comment scope, break # if the previous line isn't within a comment scope, break
@ -180,7 +183,7 @@ define-command -hidden c-family-insert-on-newline %[ evaluate-commands -itersel
] ]
# trim trailing whitespace on the previous line # trim trailing whitespace on the previous line
try %[ execute-keys -draft s\h+$<ret> d ] try %[ execute-keys -draft k <a-x> s\h+$<ret> d ]
# align the new star with the previous one # align the new star with the previous one
execute-keys K<a-x>1s^[^*]*(\*)<ret>& execute-keys K<a-x>1s^[^*]*(\*)<ret>&
] ]