[geany/geany] 2d2929: join_lines: Remove `sci_fix_selection_anchors` function.

Eugene Arshinov git-noreply at xxxxx
Sat Feb 25 15:51:32 UTC 2012

Branch:      refs/heads/master
Author:      Eugene Arshinov <earshinov at gmail.com>
Committer:   Eugene Arshinov <earshinov at gmail.com>
Date:        Sat, 25 Feb 2012 15:51:32
Commit:      2d29296302a40e5af39a81657d9a91f049fe579f

Log Message:
join_lines: Remove `sci_fix_selection_anchors` function.

Previously it was useful because `reflow_lines`, in case when selection
contained trailing newline, removed that newline from selection by
calling `sci_set_selection_end` which only works when anchor > current
cursor position (it's mentioned in Scintilla's documentation on

Now trailing newline is removed by calling `sci_deselect_last_newline`
which uses `sci_set_selection` with `start` and `end` arguments.  This
function works regardless of the interposition of current cursor
position and anchor.

Modified Paths:

Modified: src/keybindings.c
13 files changed, 0 insertions(+), 13 deletions(-)
@@ -2157,17 +2157,6 @@ static void sci_deselect_last_newline(ScintillaObject *sci)
-/* if cursor < anchor, swap them */
-static void sci_fix_selection_anchors(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;
@@ -2186,7 +2175,6 @@ static void reflow_paragraph(GeanyEditor *editor)
 	if (!sel)
-	sci_fix_selection_anchors(sci);
 	reflow_lines(editor, column);
 	if (!sel)
 		sci_set_anchor(sci, -1);
@@ -2213,7 +2201,6 @@ static void join_paragraph(GeanyEditor *editor)
 	if (!sel)
-	//sci_fix_selection_anchors(sci);
 	if (!sel)
 		sci_set_anchor(sci, -1);

This E-Mail was brought to you by github_commit_mail.py (Source: TBD).

More information about the Commits mailing list