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:
parent
9aa5ba41c7
commit
45e4b0bb89
@ -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>
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user