SF.net SVN: geany:[4570] branches/geany-0.18.1

ntrel at users.sourceforge.net ntrel at xxxxx
Thu Jan 28 13:06:23 UTC 2010


Revision: 4570
          http://geany.svn.sourceforge.net/geany/?rev=4570&view=rev
Author:   ntrel
Date:     2010-01-28 13:06:19 +0000 (Thu, 28 Jan 2010)

Log Message:
-----------
Backport from trunk:
Fix 'Reflow block' command when at the last paragraph and there's
no last newline (patch by Eugene Arshinov, thanks).

Modified Paths:
--------------
    branches/geany-0.18.1/ChangeLog
    branches/geany-0.18.1/src/keybindings.c

Modified: branches/geany-0.18.1/ChangeLog
===================================================================
--- branches/geany-0.18.1/ChangeLog	2010-01-28 13:00:47 UTC (rev 4569)
+++ branches/geany-0.18.1/ChangeLog	2010-01-28 13:06:19 UTC (rev 4570)
@@ -1,3 +1,10 @@
+2009-09-13  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * src/keybindings.c:
+   Fix 'Reflow block' command when at the last paragraph and there's
+   no last newline (patch by Eugene Arshinov, thanks).
+
+
 2009-09-01  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>
 
  * src/plugins.c:

Modified: branches/geany-0.18.1/src/keybindings.c
===================================================================
--- branches/geany-0.18.1/src/keybindings.c	2010-01-28 13:00:47 UTC (rev 4569)
+++ branches/geany-0.18.1/src/keybindings.c	2010-01-28 13:06:19 UTC (rev 4570)
@@ -2087,8 +2087,12 @@
 		/* deselect last line break */
 		pos = sci_get_selection_end(sci);
 		line = sci_get_line_from_position(sci, pos);
-		pos = sci_get_line_end_position(sci, line - 1);
-		sci_set_selection_end(sci, pos);
+		if (line < sci_get_line_count(sci) - 1)
+		{
+			/* not last line */
+			pos = sci_get_line_end_position(sci, line - 1);
+			sci_set_selection_end(sci, pos);
+		}
 	}
 	split_lines(editor);
 	if (!sel)


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list