SF.net SVN: geany:[4424] trunk
ntrel at users.sourceforge.net
ntrel at xxxxx
Thu Nov 12 15:46:05 UTC 2009
Revision: 4424
http://geany.svn.sourceforge.net/geany/?rev=4424&view=rev
Author: ntrel
Date: 2009-11-12 15:46:05 +0000 (Thu, 12 Nov 2009)
Log Message:
-----------
Fix reflow paragraph command when cursor < anchor using
sci_fix_selection().
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/keybindings.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-11-12 12:39:36 UTC (rev 4423)
+++ trunk/ChangeLog 2009-11-12 15:46:05 UTC (rev 4424)
@@ -2,6 +2,9 @@
* tagmanager/ctags.c, tagmanager/general.h:
Make TagManager Assert statements cause g_warning on failure.
+ * src/keybindings.c:
+ Fix reflow paragraph command when cursor < anchor using
+ sci_fix_selection().
2009-11-10 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/src/keybindings.c
===================================================================
--- trunk/src/keybindings.c 2009-11-12 12:39:36 UTC (rev 4423)
+++ trunk/src/keybindings.c 2009-11-12 15:46:05 UTC (rev 4424)
@@ -2225,6 +2225,17 @@
}
+/* if cursor < anchor, swap them */
+static void sci_fix_selection(ScintillaObject *sci)
+{
+ gint start, end;
+
+ start = sci_get_selection_start(sci);
+ end = sci_get_selection_end(sci);
+ sci_set_selection(sci, start, end);
+}
+
+
static void reflow_paragraph(GeanyEditor *editor)
{
ScintillaObject *sci = editor->sci;
@@ -2264,6 +2275,7 @@
sci_set_selection_end(sci, pos);
}
}
+ sci_fix_selection(sci);
split_lines(editor, column);
if (!sel)
sci_set_anchor(sci, -1);
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