From d0fca6953ca72df5a02e22c746eed2042d75dab2 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Sun, 9 Sep 2012 16:59:51 -0400 Subject: [PATCH] pointer -> index for word movement iterators --- termite.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/termite.cc b/termite.cc index fae301f..4da8c50 100644 --- a/termite.cc +++ b/termite.cc @@ -222,8 +222,8 @@ static void move_backward(VteTerminal *vte, select_info *select, F predicate) { bool in_word = false; - for (gunichar *c = codepoints + length - 2; c > codepoints; c--) { - if (predicate(*(c - 1))) { + for (long i = length - 2; i > 0; i--) { + if (predicate(codepoints[i - 1])) { if (in_word) { break; } @@ -278,8 +278,8 @@ static void move_forward(VteTerminal *vte, select_info *select, F is_word) { bool end_of_word = false; - for (gunichar *c = codepoints + 1; *c != 0; c++) { - if (is_word(*(c - 1))) { + for (long i = 1; i < length; i++) { + if (is_word(codepoints[i - 1])) { if (end_of_word) { break; }