File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,6 @@ define-command editorconfig-load -params ..1 -docstring "editorconfig-load [file
5050 if (max_line_length && max_line_length != "off") {
5151 print "set window autowrap_column " max_line_length
5252 print "autowrap-enable"
53- print "add-highlighter window/ column %sh{ echo $((" max_line_length "+1)) } default,bright-black"
5453 }
5554 }
5655 ' ;;
Original file line number Diff line number Diff line change 11declare-option -docstring " maximum amount of characters per line, after which a newline character will be inserted" \
2- int autowrap_column 80
2+ int autowrap_column 0
33
44declare-option -docstring %{
55 when enabled, paragraph formatting will reformat the whole paragraph in which characters are being inserted
@@ -48,3 +48,13 @@ define-command autowrap-enable -docstring "Automatically wrap the lines in which
4848define-command autowrap-disable -docstring " Disable automatic line wrapping" %{
4949 remove-hooks window autowrap
5050}
51+
52+ hook global WinSetOption autowrap_column=0 %{
53+ try %{
54+ remove-highlighter window /autowrap_column
55+ }
56+ }
57+
58+ hook global WinSetOption autowrap_column=(?!0 ).* %{
59+ add-highlighter -override window /autowrap_column column %sh{ echo $(( kak_opt_autowrap_column+ 1 )) } default ,bright-black
60+ }
You can’t perform that action at this time.
0 commit comments