SF.net SVN: geany: [1821] trunk/src/document.c

ntrel at users.sourceforge.net ntrel at xxxxx
Fri Aug 24 12:07:00 UTC 2007


Revision: 1821
          http://geany.svn.sourceforge.net/geany/?rev=1821&view=rev
Author:   ntrel
Date:     2007-08-24 05:06:59 -0700 (Fri, 24 Aug 2007)

Log Message:
-----------
Add pos description for document_open_file(), rewrite warning about opening multiple files.

Modified Paths:
--------------
    trunk/src/document.c

Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c	2007-08-24 11:48:37 UTC (rev 1820)
+++ trunk/src/document.c	2007-08-24 12:06:59 UTC (rev 1821)
@@ -758,9 +758,16 @@
 
 /* To open a new file, set idx to -1; filename should be locale encoded.
  * To reload a file, set the idx for the document to be reloaded; filename should be NULL.
+ * pos is the cursor position, which can be overridden by --line and --column.
  * Returns: idx of the opened file or -1 if an error occurred.
- * Note: If opening more than one file, document_delay_colourise() should be used before
- * and document_colourise_new() after opening to avoid unnecessary recolourising. */
+ *
+ * When opening more than one file, either:
+ * 1. Use document_open_files().
+ * 2. Call document_delay_colourise() before document_open_file() and
+ *    document_colourise_new() after opening all files.
+ *
+ * This avoids unnecessary recolourising, saving significant processing when a lot of files
+ * are open of a filetype that supports user typenames, e.g. C. */
 gint document_open_file(gint idx, const gchar *filename, gint pos, gboolean readonly,
 		filetype *ft, const gchar *forced_enc)
 {


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