rewrite_reflow: Remove a check inside line breaking implementation that caused breaking to occur too early

This commit is contained in:
Eugene Arshinov 2013-04-02 11:26:01 +04:00 committed by elextr
parent 7e732bddc8
commit e8443b19f7

View File

@ -551,19 +551,17 @@ static void on_update_ui(GeanyEditor *editor, G_GNUC_UNUSED SCNotification *nt)
}
static void check_line_breaking(GeanyEditor *editor, gint pos, gchar c)
static void check_line_breaking(GeanyEditor *editor, gint pos)
{
ScintillaObject *sci = editor->sci;
gint line, lstart, col;
gchar c;
if (!editor->line_breaking)
return;
col = sci_get_col_from_position(sci, pos);
if (c == GDK_space)
pos--; /* Look for previous space, not the new one */
line = sci_get_current_line(sci);
lstart = sci_get_position_from_line(sci, line);
@ -824,7 +822,7 @@ static void on_char_added(GeanyEditor *editor, SCNotification *nt)
editor_start_auto_complete(editor, pos, FALSE);
#endif
}
check_line_breaking(editor, pos, nt->ch);
check_line_breaking(editor, pos);
}