[gnote] * Fixed hang when changing the title of a note (Close #579362)



commit 5a81e3a19608f796b019054251196e96c36d816f
Author: Hubert Figuiere <hub figuiere net>
Date:   Wed Apr 22 03:17:14 2009 -0400

      * Fixed hang when changing the title of a note (Close #579362)
---
 NEWS             |    1 +
 src/watchers.cpp |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index 44e0352..d5b338d 100644
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,7 @@ Fixes:
   * Initialize gettext properly (Close #579520)
   * Properly check for libxml2.
   * Drag and drop of notes to a notebook (Close #579637)
+  * Fixed hang when changing the title of a note (Close #579362)
 
 Translations:
 
diff --git a/src/watchers.cpp b/src/watchers.cpp
index 0166d9a..a585b1e 100644
--- a/src/watchers.cpp
+++ b/src/watchers.cpp
@@ -778,7 +778,7 @@ namespace gnote {
 
       Gtk::TextIter start_iter = range.start();
       Gtk::TextIter end_iter = range.end();
-      get_buffer()->erase (start_iter, end_iter);
+      end_iter = get_buffer()->erase (start_iter, end_iter);
       start_iter = range.start();
       get_buffer()->insert_with_tag(start_iter, renamed->get_title(), m_link_tag);
     }
@@ -845,7 +845,7 @@ namespace gnote {
     int idx = 0;
 
     while (true) {
-      idx = sharp::string_index_of(buffer_text, sharp::string_substring(find_title_lower, idx));
+      idx = sharp::string_index_of(buffer_text, find_title_lower, idx);
       if (idx < 0)
         break;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]