Fix wrong cursor positioning while line breaking when the last character on the line was a space.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3057 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2008-10-07 18:52:09 +00:00
parent 9aa5ba41c7
commit 45e4b0bb89
2 changed files with 5 additions and 1 deletions

View File

@ -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 <nick(dot)treleaven(at)btinternet(dot)com>

View File

@ -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;