On 29 September 2013 18:31, Pavel Roschin <rpg89@post.ru> wrote:
> 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))
                return;

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

No, it does not check the command line options, read the code of set_cursor_position() 

Cheers
Lex

 

--
Best regards,
Pavel Roschin aka RPG