Add pos description for document_open_file(), rewrite warning about opening multiple files.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1821 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2007-08-24 12:06:59 +00:00
parent 225e404db5
commit ade8718241

View File

@ -758,9 +758,16 @@ static void set_cursor_position(gint idx, gint pos)
/* To open a new file, set idx to -1; filename should be locale encoded. /* 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. * 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. * 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, gint document_open_file(gint idx, const gchar *filename, gint pos, gboolean readonly,
filetype *ft, const gchar *forced_enc) filetype *ft, const gchar *forced_enc)
{ {