Revision: 1740 http://geany.svn.sourceforge.net/geany/?rev=1740&view=rev Author: eht16 Date: 2007-07-25 01:23:17 -0700 (Wed, 25 Jul 2007)
Log Message: ----------- Fix wrong selection handling when using Color Chooser.
Modified Paths: -------------- trunk/ChangeLog trunk/src/document.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-07-24 15:34:35 UTC (rev 1739) +++ trunk/ChangeLog 2007-07-25 08:23:17 UTC (rev 1740) @@ -1,3 +1,9 @@ +2007-07-25 Enrico Tröger enrico.troeger@uvena.de + + * src/document.c: + Fix wrong selection handling when using Color Chooser. + + 2007-07-24 Nick Treleaven nick.treleaven@btinternet.com
* src/plugindata.h, src/plugins.c:
Modified: trunk/src/document.c =================================================================== --- trunk/src/document.c 2007-07-24 15:34:35 UTC (rev 1739) +++ trunk/src/document.c 2007-07-25 08:23:17 UTC (rev 1740) @@ -2297,7 +2297,7 @@
/* Inserts the given colour (format should be #...), if there is a selection starting with 0x... - * the replacement starts also with 0x... */ + * the replacement will also start with 0x... */ void document_insert_colour(gint idx, const gchar *colour) { g_return_if_fail(DOC_IDX_VALID(idx)); @@ -2311,7 +2311,8 @@ sci_get_char_at(doc_list[idx].sci, start + 1) == 'x') { sci_set_selection_start(doc_list[idx].sci, start + 2); - replacement++; // skip the leading '#' + sci_set_selection_end(doc_list[idx].sci, start + 8); + replacement++; // skip the leading "0x" } else if (sci_get_char_at(doc_list[idx].sci, start - 1) == '#') { // double clicking something like #00ffff may only select 00ffff because of wordchars
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.