Revision: 1617 http://svn.sourceforge.net/geany/?rev=1617&view=rev Author: eht16 Date: 2007-06-14 08:47:09 -0700 (Thu, 14 Jun 2007)
Log Message: ----------- Avoid creation of unwanted undo action when opening a saved-as file in a new tab.
Modified Paths: -------------- trunk/ChangeLog trunk/src/callbacks.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-06-14 13:10:51 UTC (rev 1616) +++ trunk/ChangeLog 2007-06-14 15:47:09 UTC (rev 1617) @@ -1,3 +1,9 @@ +2007-06-14 Enrico Tröger enrico.troeger@uvena.de + + * src/callbacks.c: Avoid creation of unwanted undo action when opening + a saved-as file in a new tab. + + 2007-06-14 Nick Treleaven nick.treleaven@btinternet.com
* src/templates.c, src/interface.c, src/templates.h, src/tools.c,
Modified: trunk/src/callbacks.c =================================================================== --- trunk/src/callbacks.c 2007-06-14 13:10:51 UTC (rev 1616) +++ trunk/src/callbacks.c 2007-06-14 15:47:09 UTC (rev 1617) @@ -878,6 +878,9 @@ // use old file type (or maybe NULL for auto detect would be better?) idx = document_new_file(utf8_filename, doc_list[idx].file_type);
+ sci_set_undo_collection(doc_list[idx].sci, FALSE); // avoid creation of an undo action + sci_empty_undo_buffer(doc_list[idx].sci); + len = sci_get_length(doc_list[old_idx].sci) + 1; data = (gchar*) g_malloc(len); sci_get_text(doc_list[old_idx].sci, len, data); @@ -891,6 +894,7 @@ document_set_encoding(idx, doc_list[old_idx].encoding); sci_set_lines_wrapped(doc_list[idx].sci, doc_list[idx].line_breaking); sci_set_readonly(doc_list[idx].sci, doc_list[idx].readonly); + sci_set_undo_collection(doc_list[idx].sci, TRUE);
ui_document_show_hide(idx);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.