<div dir="ltr"><div class="gmail_extra"><br><br><div class="gmail_quote">On 29 September 2013 18:31, Pavel Roschin <span dir="ltr"><<a href="mailto:rpg89@post.ru" target="_blank">rpg89@post.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im">> pos=0 is the default when a new document is opened, only documents in the<br>
> previous session will be opened with pos != 0.  You need to call<br>
> set_cursor_position() to see if any command line options requested a<br>
> position other than zero, or you will break opening new documents from the<br>
> command line.  Note, since the command line options are line and col they<br>
> can't be translated into pos until the document is opened, so they can't<br>
> pass a pos to document_open().<br>
<br>
</div>Not sure that my patch broke something but maybe I found more acceptable<br>
solution: add into sci_goto_pos function this:<br>
<br>
        if(pos == sci_get_current_position(sci))<br>
                return;<br>
<br>
This has the same effect but it's logically clearly.<br></blockquote><div><br></div><div>No, it does not check the command line options, read the code of set_cursor_position() </div><div><br></div><div>Cheers</div><div>
Lex</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class=""><div class="h5"><br>
--<br>
Best regards,<br>
Pavel Roschin aka RPG<br>
</div></div></blockquote></div><br></div></div>