Revision: 3807 http://geany.svn.sourceforge.net/geany/?rev=3807&view=rev Author: ntrel Date: 2009-05-20 14:42:55 +0000 (Wed, 20 May 2009)
Log Message: ----------- Fix multiline indent when selection covers text on the last line.
Modified Paths: -------------- trunk/ChangeLog trunk/src/editor.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-05-19 21:06:04 UTC (rev 3806) +++ trunk/ChangeLog 2009-05-20 14:42:55 UTC (rev 3807) @@ -1,3 +1,9 @@ +2009-05-20 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> + + * src/editor.c: + Fix multiline indent when selection covers text on the last line. + + 2009-05-19 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/symbols.c, tagmanager/python.c:
Modified: trunk/src/editor.c =================================================================== --- trunk/src/editor.c 2009-05-19 21:06:04 UTC (rev 3806) +++ trunk/src/editor.c 2009-05-20 14:42:55 UTC (rev 3807) @@ -3396,8 +3396,8 @@ }
-/* extra_line is for selecting the cursor line or anchor line at the bottom of a selection, - * when those lines have no selection. */ +/* extra_line is for selecting the cursor line (or anchor line) at the bottom of a selection, + * when those lines have no selection (cursor at start of line). */ void editor_select_lines(GeanyEditor *editor, gboolean extra_line) { gint start, end, line; @@ -4542,6 +4542,8 @@ end = sci_get_selection_end(sci); lstart = sci_get_line_from_position(sci, start); lend = sci_get_line_from_position(sci, end); + if (end == sci_get_length(sci)) + lend++; /* for last line with text on it */
for (line = lstart; line < lend; line++) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.