[geany/geany] 1816b0: join_lines: Don't exclude trailing newline from the selection in `reflow_lines`

Eugene Arshinov git-noreply at xxxxx
Thu Jul 26 00:03:30 UTC 2012


Branch:      refs/heads/document-messages
Author:      Eugene Arshinov <earshinov at gmail.com>
Committer:   Eugene Arshinov <earshinov at gmail.com>
Date:        Sat, 25 Feb 2012 15:48:07
Commit:      1816b0d7f4a8b4022950ae5abfd74dbb60ce580c
             https://github.com/geany/geany/commit/1816b0d7f4a8b4022950ae5abfd74dbb60ce580c

Log Message:
-----------
join_lines: Don't exclude trailing newline from the selection in `reflow_lines`

This is now done by the calling code.


Modified Paths:
--------------
    src/keybindings.c

Modified: src/keybindings.c
9 files changed, 1 insertions(+), 8 deletions(-)
===================================================================
@@ -2085,14 +2085,7 @@ static gint get_reflow_column(GeanyEditor *editor)
 
 static void reflow_lines(GeanyEditor *editor, gint column)
 {
-	gint start, indent, linescount, i, end;
-	gchar c;
-	ScintillaObject *sci = editor->sci;
-
-	/* don't include trailing newlines */
-	end = sci_get_selection_end(sci);
-	while ((c = sci_get_char_at(sci, end - 1)) == '\n' || c == '\r') end--;
-	sci_set_selection_end(sci, end);
+	gint start, indent, linescount, i;
 
 	start = sci_get_line_from_position(editor->sci,
 		sci_get_selection_start(editor->sci));


@@ Diff output truncated at 100000 characters. @@


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



More information about the Commits mailing list