]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/textctrl.cpp
wxOS2 with Open Watcom: correct PCH usage, missing headers, warning fixes, source...
[wxWidgets.git] / src / gtk1 / textctrl.cpp
index 52c1f01d66f0bb8150ca4b6f0b0c5a32b1833aa1..3f975f9b1ff4636a8cbb27f0124772ed82114451 100644 (file)
@@ -42,7 +42,6 @@ extern bool g_isIdle;
 // data
 //-----------------------------------------------------------------------------
 
-extern bool       g_blockEventsOnDrag;
 extern wxCursor   g_globalCursor;
 extern wxWindowGTK *g_delayedFocus;
 
@@ -1092,12 +1091,12 @@ wxString wxTextCtrl::GetLineText( long lineNo ) const
 #else
         GtkTextIter line;
         gtk_text_buffer_get_iter_at_line(m_buffer,&line,lineNo);
-        GtkTextIter end;
-        gtk_text_buffer_get_end_iter(m_buffer,&end );
+        GtkTextIter end = line;
+        gtk_text_iter_forward_to_line_end(&end);
         gchar *text = gtk_text_buffer_get_text(m_buffer,&line,&end,TRUE);
         wxString result(wxGTK_CONV_BACK(text));
         g_free(text);
-        return result.BeforeFirst(wxT('\n'));
+        return result;
 #endif
     }
     else