GNOME Bugzilla – Bug 711512
Search Text in Editor
Last modified: 2013-11-08 20:35:16 UTC
In the editor window when we search a Text (using Ctrl+f) like "Ty" and the file has text "Td" , the string "Td" is matched and colored since it has matched "T" of both the strings. But "Td" should not be colored as it is not equal to the search string "Ty" even if some part of it as matched "Td".
Created attachment 259041 [details] [review] Patch Search Text in Editor
Comment on attachment 259041 [details] [review] Patch Search Text in Editor Thanks for your patch. Please fix the style issue by using the same style as the surrounding code when it comes to whitespaces between commas, equal signs, function names and brackets; plus make sure to use the same indentation length plus tabs vs. spaces. This is inconsistent in your patch.
Created attachment 259081 [details] [review] Modified Patch
Created attachment 259082 [details] [review] Modified Patch
Review of attachment 259082 [details] [review]: Keep in mind that GObject/C uses explicit memory management, so most objects are not free'd automatically and you have to reduce their refcount by g_object_unref(). But looks good otherwise - thanks! ::: plugins/document-manager/search-box.c @@ +577,3 @@ + ianjuta_editor_selection_set (selection, + IANJUTA_ITERABLE (selection_start), + IANJUTA_ITERABLE (selection_start), TRUE, NULL); As far as I can see to need to add a g_object_unref (selection_start) to avoid a memory leak.
Created attachment 259134 [details] [review] Added g_object_unref (selection_start) for avoiding memory leak
Review of attachment 259134 [details] [review]: Thanks! You still have whitespace issues in your patch (which I fixed). Please stick to the indentation used in the files, e.g. just leave auto-indentation in anjuta enabled as it is by default and if in doubt, select the text you changed and type <Ctrl-I> to indent it automatically.