<p><b>@codebrainz</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/geany/geany/pull/1537#discussion_r127564470">src/navqueue.c</a>:</p>
<pre style='color:#555'>> @@ -192,6 +192,14 @@ static gboolean goto_file_pos(const gchar *file, gint pos)
 void navqueue_go_back(void)
 {
        filepos *fprev;
+       GeanyDocument *doc = document_get_current();
+
+       /* If the navqueue is currently at some position A, but the actual cursor is at some other
+        * place B, we should add B to the navqueue, so that (1) we go back to A, not to the next
+        * item in the queue; and (2) we can later restore B by going forward.
+        * (If A = B, add_new_position will ignore it.) */
+       if (doc && doc->file_name)
</pre>
<p>Personally I don't think it's harmful to include the <code>NULL</code> check, but as <a href="https://github.com/kugel-" class="user-mention">@kugel-</a> points out, the UI makes it impossible for this code to run if there's no documents open, so as a compromise, I suggested an assertion. That way the check can be excluded from release builds but if the function should ever make it into the plugin API as you mentioned, it will indicate exactly what the problem is to the plugin developer.</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/1537#discussion_r127564470">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ0Nnji1Lrkb_GmpWi1r3ySVRK_t0ks5sN_LpgaJpZM4OR0zM">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ091cl9h90cuRwj5M9vCf-yo-Unhks5sN_LpgaJpZM4OR0zM.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/1537#discussion_r127564470"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany","title":"geany/geany","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"PERSON","message":"@codebrainz commented on #1537"}],"action":{"name":"View Pull Request","url":"https://github.com/geany/geany/pull/1537#discussion_r127564470"}}}</script>