From d530a2d86473b18ade420c5c7f3a77f9a6930648 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 4 Sep 2012 00:04:49 +0200 Subject: [PATCH] Support # comments in commands --- src/command_manager.cc | 5 +++++ src/rc/kakrc.kak | 1 + 2 files changed, 6 insertions(+) diff --git a/src/command_manager.cc b/src/command_manager.cc index a636d852..1110583f 100644 --- a/src/command_manager.cc +++ b/src/command_manager.cc @@ -88,6 +88,11 @@ TokenList parse(const String& line, ++pos; else if (line[pos] == '\\' and pos+1 < length and line[pos+1] == '\n') pos += 2; + else if (line[pos] == '#') + { + while (pos != length and line[pos] != '\n') + ++pos; + } else break; } diff --git a/src/rc/kakrc.kak b/src/rc/kakrc.kak index dee0f42e..6efbde36 100644 --- a/src/rc/kakrc.kak +++ b/src/rc/kakrc.kak @@ -10,6 +10,7 @@ hook global WinSetOption filetype=kak %{ addhl -group kak-highlight regex (?<=\