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.
This commit is contained in:
parent
d1fcd9f226
commit
46ed77bf19
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user