diff --git a/ChangeLog b/ChangeLog index 0cba572a..9d72efaf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,9 @@ * plugins/filebrowser.c, plugins/htmlchars.c, src/editor.c, src/msgwindow.c, src/plugins.c, src/prefs.c, src/treeviews.c: Plug some memory leaks due to some missing g_object_unref's. + * src/editor.c: + Fix wrong cursor positioning while line breaking when the last + character on the line was a space. 2008-10-07 Nick Treleaven diff --git a/src/editor.c b/src/editor.c index 6ba95b67..f96ff66f 100644 --- a/src/editor.c +++ b/src/editor.c @@ -351,6 +351,8 @@ static void check_line_breaking(GeanyEditor *editor, gint pos, 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 */ @@ -359,7 +361,6 @@ static void check_line_breaking(GeanyEditor *editor, gint pos, gchar c) lstart = sci_get_position_from_line(sci, line); /* use column instead of position which might be different with multibyte characters */ - col = sci_get_col_from_position(sci, pos); if (col < editor_prefs.line_break_column) return;