ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=2387ceac88681987a797e475f315a5fdf4fa025a

commit 2387ceac88681987a797e475f315a5fdf4fa025a
Author: Andy Williams <[email protected]>
Date:   Tue Nov 18 23:46:24 2014 +0000

    Fix render test and an end of line corner case
---
 elm_code/lib/elm_code_widget.c        |  2 +-
 elm_code/tests/elm_code_test_widget.c | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/elm_code/lib/elm_code_widget.c b/elm_code/lib/elm_code_widget.c
index 9d44163..572fd3a 100644
--- a/elm_code/lib/elm_code_widget.c
+++ b/elm_code/lib/elm_code_widget.c
@@ -39,7 +39,7 @@ static void 
_elm_code_widget_fill_line_token(Evas_Textgrid_Cell *cells, int coun
 {
    int x;
 
-   for (x = start; x <= end && x < count; x++)
+   for (x = start; x <= end && x <= count; x++)
      {
         cells[x].fg = type;
      }
diff --git a/elm_code/tests/elm_code_test_widget.c 
b/elm_code/tests/elm_code_test_widget.c
index 27b867e..9f499ac 100644
--- a/elm_code/tests/elm_code_test_widget.c
+++ b/elm_code/tests/elm_code_test_widget.c
@@ -28,12 +28,12 @@ START_TEST (elm_code_widget_token_render_simple_test)
    elm_code_file_line_token_add(file, 1, 22+1, 23+1, 
ELM_CODE_TOKEN_TYPE_COMMENT);
 
    elm_code_widget_fill_line_tokens(cells, length, line);
-   _assert_cell_type(cells[0], ELM_CODE_TOKEN_TYPE_DEFAULT);
-   _assert_cell_type(cells[3], ELM_CODE_TOKEN_TYPE_DEFAULT);
-   _assert_cell_type(cells[5], ELM_CODE_TOKEN_TYPE_DEFAULT);
-   _assert_cell_type(cells[15], ELM_CODE_TOKEN_TYPE_COMMENT);
-   _assert_cell_type(cells[19], ELM_CODE_TOKEN_TYPE_DEFAULT);
-   _assert_cell_type(cells[22], ELM_CODE_TOKEN_TYPE_COMMENT);
+   _assert_cell_type(cells[1], ELM_CODE_TOKEN_TYPE_DEFAULT);
+   _assert_cell_type(cells[4], ELM_CODE_TOKEN_TYPE_DEFAULT);
+   _assert_cell_type(cells[6], ELM_CODE_TOKEN_TYPE_DEFAULT);
+   _assert_cell_type(cells[16], ELM_CODE_TOKEN_TYPE_COMMENT);
+   _assert_cell_type(cells[20], ELM_CODE_TOKEN_TYPE_DEFAULT);
+   _assert_cell_type(cells[23], ELM_CODE_TOKEN_TYPE_COMMENT);
 
    elm_code_free(code);
 }

-- 


Reply via email to