[Geany-Devel] Geany performance

Pavel Roschin rpg89 at xxxxx
Sun Sep 29 08:31:26 UTC 2013

> pos=0 is the default when a new document is opened, only documents in the
> previous session will be opened with pos != 0.  You need to call
> set_cursor_position() to see if any command line options requested a
> position other than zero, or you will break opening new documents from the
> command line.  Note, since the command line options are line and col they
> can't be translated into pos until the document is opened, so they can't
> pass a pos to document_open().

Not sure that my patch broke something but maybe I found more acceptable
solution: add into sci_goto_pos function this:

	if(pos == sci_get_current_position(sci))

This has the same effect but it's logically clearly.

Best regards,
Pavel Roschin aka RPG

More information about the Devel mailing list