Fix line breaking with multibyte characters (#1960)

Fixes #1958 

Also replace GDK_space with ASCII space, its searching for that, not the keycode (which just happens to have the same value, lucky).
This commit is contained in:
elextr 2018-11-18 19:29:54 +10:00 committed by GitHub
parent 7956fd5b3a
commit 653b06e07a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -556,12 +556,12 @@ static void check_line_breaking(GeanyEditor *editor, gint pos)
return;
/* look for the last space before line_break_column */
pos = MIN(pos, lstart + get_project_pref(line_break_column));
pos = sci_get_position_from_col(sci, lstart, get_project_pref(line_break_column));
while (pos > lstart)
{
c = sci_get_char_at(sci, --pos);
if (c == GDK_space)
if (c == ' ')
{
gint diff, last_pos, last_col;