Branch: refs/heads/master Author: Pavel Sountsov siege@google.com Committer: SiegeLord slabode@aim.com Date: Sun, 16 Aug 2015 18:22:01 UTC Commit: 2a887fee30c4444db29be4e05a53cb323bc9a5c5 https://github.com/geany/geany/commit/2a887fee30c4444db29be4e05a53cb323bc9a5...
Log Message: ----------- Don't strip spaces from the next line when whole lines are selected.
Modified Paths: -------------- src/editor.c
Modified: src/editor.c 10 lines changed, 8 insertions(+), 2 deletions(-) =================================================================== @@ -4454,8 +4454,14 @@ void editor_strip_trailing_spaces(GeanyEditor *editor, gboolean ignore_selection
if (sci_has_selection(editor->sci) && !ignore_selection) { - start_line = sci_get_line_from_position(editor->sci, sci_get_selection_start(editor->sci)); - end_line = sci_get_line_from_position(editor->sci, sci_get_selection_end(editor->sci)) + 1; + gint selection_start = sci_get_selection_start(editor->sci); + gint selection_end = sci_get_selection_end(editor->sci); + + start_line = sci_get_line_from_position(editor->sci, selection_start); + end_line = sci_get_line_from_position(editor->sci, selection_end); + + if (sci_get_col_from_position(editor->sci, selection_end) > 0) + end_line++; } else {
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).