[gtksourceview/wip/improve-bracket-matching: 2/3] Bracket matching: rename #define so that a comment is useless
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/wip/improve-bracket-matching: 2/3] Bracket matching: rename #define so that a comment is useless
- Date: Fri, 23 Oct 2015 15:53:02 +0000 (UTC)
commit cd1f30dc243779b40004045534edb86644316d80
Author: Sébastien Wilmet <swilmet gnome org>
Date: Fri Oct 23 17:25:58 2015 +0200
Bracket matching: rename #define so that a comment is useless
gtksourceview/gtksourcebuffer.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/gtksourceview/gtksourcebuffer.c b/gtksourceview/gtksourcebuffer.c
index 466df07..d6e7ede 100644
--- a/gtksourceview/gtksourcebuffer.c
+++ b/gtksourceview/gtksourcebuffer.c
@@ -141,10 +141,8 @@
#define PROFILE(x)
#endif
-/* For bracket matching */
-#define MAX_CHARS_BEFORE_FINDING_A_MATCH 10000
-
-#define CONTEXT_CLASSES_PREFIX "gtksourceview:context-classes:"
+#define BRACKET_MATCHING_CHARS_LIMIT 10000
+#define CONTEXT_CLASSES_PREFIX "gtksourceview:context-classes:"
/* Signals */
enum
@@ -1174,7 +1172,7 @@ get_bracket_matching_context_class_mask (GtkSourceBuffer *buffer,
return mask;
}
-/* Note that we only look MAX_CHARS_BEFORE_FINDING_A_MATCH at most. */
+/* Note that we only look BRACKET_MATCHING_CHARS_LIMIT at most. */
static GtkSourceBracketMatchType
gtk_source_buffer_find_bracket_match_real (GtkSourceBuffer *buffer,
GtkTextIter *pos)
@@ -1245,7 +1243,7 @@ gtk_source_buffer_find_bracket_match_real (GtkSourceBuffer *buffer,
}
}
while (!gtk_text_iter_is_end (&iter) && !gtk_text_iter_is_start (&iter) &&
- (char_cont < MAX_CHARS_BEFORE_FINDING_A_MATCH));
+ (char_cont < BRACKET_MATCHING_CHARS_LIMIT));
if (found)
{
@@ -1253,7 +1251,7 @@ gtk_source_buffer_find_bracket_match_real (GtkSourceBuffer *buffer,
return GTK_SOURCE_BRACKET_MATCH_FOUND;
}
- if (char_cont >= MAX_CHARS_BEFORE_FINDING_A_MATCH)
+ if (char_cont >= BRACKET_MATCHING_CHARS_LIMIT)
{
return GTK_SOURCE_BRACKET_MATCH_OUT_OF_RANGE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]