<p>When creating a new document for a non-existing file from the command line, check if we don't already have opened it and simply show the existing one if we do.  This avoids creating new documents that will be saved to the same location again and again.</p>

<p>Closes <a href="https://bugs.launchpad.net/linuxmint/+bug/1482558">https://bugs.launchpad.net/linuxmint/+bug/1482558</a></p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/geany/geany/pull/646'>https://github.com/geany/geany/pull/646</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Don't open more than one document for non-existing paths from the CLI</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/646/files#diff-0">src/libmain.c</a>
    (6)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/geany/geany/pull/646.patch'>https://github.com/geany/geany/pull/646.patch</a></li>
  <li><a href='https://github.com/geany/geany/pull/646.diff'>https://github.com/geany/geany/pull/646.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/geany/geany/pull/646">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJxWQfmkpKyoJYr7Zzt4yKXaTz5duks5ovukcgaJpZM4F5jOL.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/pull/646"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>