[gnome-builder] GbSourceView: skip past escaped characters when counting char matches
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] GbSourceView: skip past escaped characters when counting char matches
- Date: Fri, 2 Jan 2015 23:55:39 +0000 (UTC)
commit 025b9f7507d1ed83f43ae484846532a3caf32ad3
Author: Christian Hergert <christian hergert me>
Date: Fri Jan 2 15:54:11 2015 -0800
GbSourceView: skip past escaped characters when counting char matches
src/editor/gb-source-view.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/editor/gb-source-view.c b/src/editor/gb-source-view.c
index ef49918..ec39069 100644
--- a/src/editor/gb-source-view.c
+++ b/src/editor/gb-source-view.c
@@ -1414,6 +1414,13 @@ count_chars_on_line (GbSourceView *view,
gunichar ch;
ch = gtk_text_iter_get_char (&cur);
+
+ if (ch == '\\')
+ {
+ gtk_text_iter_forward_chars (&cur, 2);
+ continue;
+ }
+
count += (ch == expected_char);
gtk_text_iter_forward_char (&cur);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]