From b3f817c1ff3beba072cf9f9f1efc84360127f852 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Wed, 19 Sep 2018 16:50:26 +0300 Subject: [PATCH 1/4] Fix highlighting of unsigned long long in C filetype Values like `0xffffffffffffffffull` were highlighted only till first `u` leaving `ll` without highlighting. This change addresses this issue. It also adds uppercase `ULL` highlighting in values. --- rc/core/c-family.kak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc/core/c-family.kak b/rc/core/c-family.kak index 19d9750b..96c56ac9 100644 --- a/rc/core/c-family.kak +++ b/rc/core/c-family.kak @@ -154,7 +154,7 @@ evaluate-commands %sh{ } # c specific -add-highlighter shared/c/code/numbers regex %{\b-?(0x[0-9a-fA-F]+|\d+)[fdiu]?|'((\\.)?|[^'\\])'} 0:value +add-highlighter shared/c/code/numbers regex %{\b-?(0x[0-9a-fA-F]+|\d+)([fdiuUlL]+)?|'((\\.)?|[^'\\])'} 0:value evaluate-commands %sh{ # Grammar keywords="asm break case continue default do else for goto if return From ab09864bd588ec1999de9bb5de9d233e5964fcb6 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Tue, 25 Sep 2018 10:23:07 +0300 Subject: [PATCH 2/4] Update c-family.kak --- rc/core/c-family.kak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc/core/c-family.kak b/rc/core/c-family.kak index 96c56ac9..2e4608e4 100644 --- a/rc/core/c-family.kak +++ b/rc/core/c-family.kak @@ -154,7 +154,7 @@ evaluate-commands %sh{ } # c specific -add-highlighter shared/c/code/numbers regex %{\b-?(0x[0-9a-fA-F]+|\d+)([fdiuUlL]+)?|'((\\.)?|[^'\\])'} 0:value +add-highlighter shared/c/code/numbers regex %{\b-?(0x[0-9a-fA-F]+|\d+)([fFdDiIuUlL]+)?|'((\\.)?|[^'\\])'} 0:value evaluate-commands %sh{ # Grammar keywords="asm break case continue default do else for goto if return From 5dce9237855c34ab632a7a20581202034d73a084 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Tue, 2 Oct 2018 19:01:53 +0300 Subject: [PATCH 3/4] use more complex regex to handle all suffix combinations --- rc/core/c-family.kak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc/core/c-family.kak b/rc/core/c-family.kak index 2e4608e4..1249e4c0 100644 --- a/rc/core/c-family.kak +++ b/rc/core/c-family.kak @@ -154,7 +154,7 @@ evaluate-commands %sh{ } # c specific -add-highlighter shared/c/code/numbers regex %{\b-?(0x[0-9a-fA-F]+|\d+)([fFdDiIuUlL]+)?|'((\\.)?|[^'\\])'} 0:value +add-highlighter shared/c/code/numbers regex %{\b-?(0x[0-9a-fA-F]+|\d+)([uU][lL]{1,2}|[uU]|[lL]{1,2}|[lL]{1,2}[uU]|[fFdDiI])?|'((\\.)?|[^'\\])'} 0:value evaluate-commands %sh{ # Grammar keywords="asm break case continue default do else for goto if return From 44483e06f782b3d9ee0a599091d0198007c88338 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Wed, 3 Oct 2018 15:16:16 +0300 Subject: [PATCH 4/4] Simplifed regex variant by mawww --- rc/core/c-family.kak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc/core/c-family.kak b/rc/core/c-family.kak index 1249e4c0..f131afaa 100644 --- a/rc/core/c-family.kak +++ b/rc/core/c-family.kak @@ -154,7 +154,7 @@ evaluate-commands %sh{ } # c specific -add-highlighter shared/c/code/numbers regex %{\b-?(0x[0-9a-fA-F]+|\d+)([uU][lL]{1,2}|[uU]|[lL]{1,2}|[lL]{1,2}[uU]|[fFdDiI])?|'((\\.)?|[^'\\])'} 0:value +add-highlighter shared/c/code/numbers regex %{\b-?(0x[0-9a-fA-F]+|\d+)([uU][lL]{0,2}|[lL]{1,2}[uU]?|[fFdDiI])?|'((\\.)?|[^'\\])'} 0:value evaluate-commands %sh{ # Grammar keywords="asm break case continue default do else for goto if return