From 141a3a2107f14dd6a4e87453da5b1820253516d8 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Mon, 1 Dec 2014 13:11:29 -0600 Subject: [PATCH] Fix a crash bby removing some dead code. Parsing will move to elm_code in the long term anyway --- src/bin/editor/edi_editor.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/bin/editor/edi_editor.c b/src/bin/editor/edi_editor.c index 045de3e..d103e43 100644 --- a/src/bin/editor/edi_editor.c +++ b/src/bin/editor/edi_editor.c @@ -310,21 +310,11 @@ _clang_load_highlighting(const char *path, Edi_Editor *editor) { CXFile cfile = clang_getFile(editor->tx_unit, path); - int tgridw = 0, tgridh = 0; - evas_object_textblock_size_native_get(elm_entry_textblock_get(editor->entry), &tgridw, &tgridh); -#if 0 - /* FIXME: Should be used, I don't know why tokenize doesn't work in mid - * comment cases and etc. */ - int range_start, range_end; - range_start = editor->offset; - range_end = editor->offset + tgridh; - CXSourceRange range = clang_getRange(clang_getLocation(editor->tx_unit, cfile, range_start, 1), clang_getLocation(editor->tx_unit, cfile, range_end, tgridw)); -#else CXSourceRange range = clang_getRange( clang_getLocationForOffset(editor->tx_unit, cfile, 0), clang_getLocationForOffset(editor->tx_unit, cfile, eina_file_size_get(eina_file_open(path, EINA_FALSE)))); -#endif + clang_tokenize(editor->tx_unit, range, &tokens, &n); /* FIXME: We should use annotate tokens and then use a lot more * color classes. I don't know why it's broken ATM... :( */