Fix multiline indent when selection covers text on the last line.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3807 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2009-05-20 14:42:55 +00:00
parent b0b8c0c91c
commit 9164411390
2 changed files with 10 additions and 2 deletions

View File

@ -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:

View File

@ -3396,8 +3396,8 @@ void editor_select_word(GeanyEditor *editor)
}
/* 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 @@ void editor_indent(GeanyEditor *editor, gboolean increase)
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++)
{