SF.net SVN: geany: [2585] trunk
ntrel at users.sourceforge.net
ntrel at xxxxx
Wed May 14 16:37:17 UTC 2008
Revision: 2585
http://geany.svn.sourceforge.net/geany/?rev=2585&view=rev
Author: ntrel
Date: 2008-05-14 09:37:09 -0700 (Wed, 14 May 2008)
Log Message:
-----------
Fix line breaking not getting reset for new documents sometimes.
Merge all document default settings into init_doc_struct().
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/document.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-05-14 16:13:16 UTC (rev 2584)
+++ trunk/ChangeLog 2008-05-14 16:37:09 UTC (rev 2585)
@@ -30,6 +30,9 @@
* src/document.c:
Recolourise the document in document_reload_file() because the
text may have changed (should fix #1948857).
+ * src/document.c:
+ Fix line breaking not getting reset for new documents sometimes.
+ Merge all document default settings into init_doc_struct().
2008-05-13 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c 2008-05-14 16:13:16 UTC (rev 2584)
+++ trunk/src/document.c 2008-05-14 16:37:09 UTC (rev 2585)
@@ -347,11 +347,16 @@
new_doc->tm_file = NULL;
new_doc->encoding = NULL;
new_doc->has_bom = FALSE;
+ new_doc->saved_encoding.encoding = NULL;
+ new_doc->saved_encoding.has_bom = FALSE;
new_doc->sci = NULL;
new_doc->undo_actions = NULL;
new_doc->redo_actions = NULL;
new_doc->scroll_percent = -1.0F;
new_doc->line_breaking = FALSE;
+ new_doc->mtime = 0;
+ new_doc->changed = FALSE;
+ new_doc->last_check = time(NULL);
}
@@ -464,12 +469,14 @@
if (new_idx == -1) /* expand the array, no free places */
{
document new_doc;
- init_doc_struct(&new_doc);
new_idx = doc_array->len;
g_array_append_val(doc_array, new_doc);
}
this = &doc_list[new_idx];
+ init_doc_struct(this); /* initialize default document settings */
+ this->file_name = (utf8_filename) ? g_strdup(utf8_filename) : NULL;
+
this->sci = create_new_sci(new_idx);
document_apply_update_prefs(new_idx);
@@ -480,24 +487,6 @@
pango_font_description_free(pfd);
g_free(fname);
- this->tag_store = NULL;
- this->tag_tree = NULL;
-
- /* store important pointers in the tab list */
- this->file_name = (utf8_filename) ? g_strdup(utf8_filename) : NULL;
- this->encoding = NULL;
- this->saved_encoding.encoding = NULL;
- this->saved_encoding.has_bom = FALSE;
- this->tm_file = NULL;
- this->file_type = NULL;
- this->mtime = 0;
- this->changed = FALSE;
- this->last_check = time(NULL);
- this->readonly = FALSE;
- this->line_wrapping = editor_prefs.line_wrapping;
- this->auto_indent = (editor_prefs.indent_mode != INDENT_NONE);
- this->has_tags = FALSE;
-
treeviews_openfiles_add(new_idx); /* sets this->iter */
tabnum = notebook_new_tab(new_idx);
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