[bijiben] webkit-editor: Fix saving title



commit 1d67c89275c88f66e6b5c0c6ba1377ccdcf0e968
Author: Isaque Galdino <igaldino gmail com>
Date:   Mon Feb 5 19:57:04 2018 -0200

    webkit-editor: Fix saving title
    
    When you have only one line in a note, Notes should use that as title,
    but it only considers a title when it has at least two.
    
    This patch changes that, so Notes will start to consider a note to have
    at least 1 line for saving.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=793101

 src/libbiji/editor/biji-webkit-editor.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/src/libbiji/editor/biji-webkit-editor.c b/src/libbiji/editor/biji-webkit-editor.c
index 43eaeaa..3a4d4c2 100644
--- a/src/libbiji/editor/biji-webkit-editor.c
+++ b/src/libbiji/editor/biji-webkit-editor.c
@@ -296,10 +296,7 @@ biji_webkit_editor_content_changed (BijiWebkitEditor *self,
 
   rows = g_strsplit (text, "\n", 2);
 
-  /* if we have a line feed, we have a proper title */
-  /* this is equivalent to g_strv_length (rows) > 1 */
-
-  if (rows && rows[0] && rows[1])
+  if (rows && rows[0])
   {
     gchar *title;
     gchar *unique_title;


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