[geany/geany] 46ed77: reflow: Fix infinite loop on some input with many consecutive spaces
Colomban Wendling
git-noreply at xxxxx
Mon Jan 4 20:58:42 UTC 2016
Branch: refs/heads/master
Author: Colomban Wendling <ban at herbesfolles.org>
Committer: Colomban Wendling <ban at herbesfolles.org>
Date: Mon, 04 Jan 2016 20:58:42 UTC
Commit: 46ed77bf195c6bc08601b0e5a2055de2fc4b9cff
https://github.com/geany/geany/commit/46ed77bf195c6bc08601b0e5a2055de2fc4b9cff
Log Message:
-----------
reflow: Fix infinite loop on some input with many consecutive spaces
Avoid triggering auto-indentation with consecutive whitespaces when
reflowing, as it can lead to infinite loop if auto-indent leads to
inserting full lines.
Fixes #848.
Modified Paths:
--------------
src/keybindings.c
Modified: src/keybindings.c
4 lines changed, 1 insertions(+), 3 deletions(-)
===================================================================
@@ -2247,9 +2247,7 @@ static gint split_line(GeanyEditor *editor, gint column)
if (!found)
break;
- sci_set_current_position(sci, pos + 1, FALSE);
- sci_cancel(sci); /* don't select from completion list */
- sci_send_command(sci, SCI_NEWLINE);
+ sci_insert_text(sci, pos + 1, editor_get_eol_char(editor));
line++;
}
return line - start_line;
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list