2008-06-22 [colin] 3.4.0cvs104
authorColin Leroy <colin@colino.net>
Sun, 22 Jun 2008 08:11:04 +0000 (08:11 +0000)
committerColin Leroy <colin@colino.net>
Sun, 22 Jun 2008 08:11:04 +0000 (08:11 +0000)
* src/compose.c
Fix initial cursor pos

ChangeLog
PATCHSETS
configure.ac
src/compose.c

index 8835ca3..c8ccc39 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-06-22 [colin]     3.4.0cvs104
+
+       * src/compose.c
+               Fix initial cursor pos
+
 2008-06-21 [paul]      3.4.0cvs103
 
        * manual/plugins.xml
index 2ddea39..f94a506 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.50 -r 1.1.2.51 manual/advanced.xml;  cvs diff -u -r 1.1.2.13 -r 1.1.2.14 manual/es/advanced.xml;  cvs diff -u -r 1.4.2.62 -r 1.4.2.63 src/gtk/about.c;  ) > 3.4.0cvs101.patchset
 ( cvs diff -u -r 1.4.2.63 -r 1.4.2.64 src/gtk/about.c;  ) > 3.4.0cvs102.patchset
 ( cvs diff -u -r 1.1.2.21 -r 1.1.2.22 manual/plugins.xml;  ) > 3.4.0cvs103.patchset
+( cvs diff -u -r 1.382.2.454 -r 1.382.2.455 src/compose.c;  ) > 3.4.0cvs104.patchset
index e776118..f542bc5 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=4
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=103
+EXTRA_VERSION=104
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 46cb7ca..e0f9654 100644 (file)
@@ -2923,10 +2923,10 @@ static gchar *compose_quote_fmt(Compose *compose, MsgInfo *msginfo,
        }
 
        cursor_pos = quote_fmt_get_cursor_pos();
+       if (cursor_pos == -1)
+               cursor_pos = gtk_text_iter_get_offset(&iter);
        compose->set_cursor_pos = cursor_pos;
-       if (cursor_pos == -1) {
-               cursor_pos = 0;
-       }
+
        gtk_text_buffer_get_start_iter(buffer, &iter);
        gtk_text_buffer_get_iter_at_offset(buffer, &iter, cursor_pos);
        gtk_text_buffer_place_cursor(buffer, &iter);