<p>In <a href="https://github.com/geany/geany/pull/1144#discussion_r72897052">src/notebook.c</a>:</p>
<pre style='color:#555'>> @@ -65,6 +66,8 @@ static gboolean switch_in_progress = FALSE;
>  static GtkWidget *switch_dialog = NULL;
>  static GtkWidget *switch_dialog_label = NULL;
>  
> +static gboolean doc_saves_to_new_file = FALSE;
</pre>
<blockquote>
<p>Ideally there wouldn't be any need for a hack to know whether it was saved or saved as</p>
</blockquote>

<p>Would that unexpectedly move a manually rearranged tab when simply just  saving a file?</p>

<blockquote>
<p>it only finds out whether it's the first save, not whether the filename changed.</p>
</blockquote>

<p>As I observed, <code>doc->real_path</code> is always <code>NULL</code> in a <code>"document-before-save"</code> event when saving to a new file.  Is there a case where this is different?  I'll check it again.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/1144/files/c064984ff29744294b7c25d2987c5b51f3c24405#r72897052">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ9uFR9ErZswa2YVtwai1aj-0eJZAks5qbAkOgaJpZM4JQxCD">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ498AWkP1DAbAxpMJ4rWw1TQ9RqMks5qbAkOgaJpZM4JQxCD.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/1144/files/c064984ff29744294b7c25d2987c5b51f3c24405#r72897052"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>