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

<hr>

<p>In <a href="https://github.com/geany/geany/pull/2161#discussion_r286744569">plugins/filebrowser.c</a>:</p>
<pre style='color:#555'>> @@ -736,13 +739,9 @@ static gboolean on_button_press(GtkWidget *widget, GdkEventButton *event, gpoint
        }
        else if (event->button == 3)
        {
-               static GtkWidget *popup_menu = NULL;
</pre>
<p>One of the meanings in C of <code>static</code> is that it's only initialized once for the whole runtime, so the above code initializes <code>popup_menu</code> to <code>NULL</code> for the only/one-time initialization. Then the <code>if (popup_menu == NULL)</code> branch says "if this is the first time through this code, assign <code>popup_menu</code> with some runtime value and then never enter this branch again." It's not terribly good code, IMO, but it isn't wrong either.</p>
<blockquote>
<p>I have to revert this?</p>
</blockquote>
<p>I'm not strictly opposed to the change, it just looks completely unrelated to the pull request and an argument could be made that if it's only used in one place, and it's going to leak memory anyway, then having the variable definition closer to the use of it is best.</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/2161?email_source=notifications&email_token=AAIOWJ7ZX4QIDZTEFBRRWEDPWXWNZA5CNFSM4HOYRDFKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOBZOJXTY#discussion_r286744569">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJZ4SVCFGMU6VNSPOJLPWXWNZANCNFSM4HOYRDFA">mute the thread</a>.<img src="https://github.com/notifications/beacon/AAIOWJ3BICUANJKGLJVGPPDPWXWNZA5CNFSM4HOYRDFKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOBZOJXTY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/2161?email_source=notifications\u0026email_token=AAIOWJ7ZX4QIDZTEFBRRWEDPWXWNZA5CNFSM4HOYRDFKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOBZOJXTY#discussion_r286744569",
"url": "https://github.com/geany/geany/pull/2161?email_source=notifications\u0026email_token=AAIOWJ7ZX4QIDZTEFBRRWEDPWXWNZA5CNFSM4HOYRDFKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOBZOJXTY#discussion_r286744569",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>