SF.net SVN: geany:[3057] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Tue Oct 7 18:52:09 UTC 2008


Revision: 3057
          http://geany.svn.sourceforge.net/geany/?rev=3057&view=rev
Author:   eht16
Date:     2008-10-07 18:52:09 +0000 (Tue, 07 Oct 2008)

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

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/editor.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2008-10-07 18:51:50 UTC (rev 3056)
+++ trunk/ChangeLog	2008-10-07 18:52:09 UTC (rev 3057)
@@ -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>

Modified: trunk/src/editor.c
===================================================================
--- trunk/src/editor.c	2008-10-07 18:51:50 UTC (rev 3056)
+++ trunk/src/editor.c	2008-10-07 18:52:09 UTC (rev 3057)
@@ -351,6 +351,8 @@
 	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 @@
 	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;
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list