<p>I think the behavior is correct/expected.  Well, it is almost for sure if the comment was already indented, and if it wasn't it highly depends on style and what the comment was actually commenting on.</p>

<p>Imagine the following code:</p>

<div class="highlight highlight-source-python"><pre><span class="pl-c"># this function does nothing</span>
<span class="pl-k">def</span> <span class="pl-en">foo</span>():
    <span class="pl-k">pass</span></pre></div>

<p>Now imagine I want to wrap it in a block (as in Python nested functions are valid):</p>

<div class="highlight highlight-source-python"><pre><span class="pl-k">def</span> <span class="pl-en">get_foo</span>():
    <span class="pl-c"># this function does nothing</span>
    <span class="pl-k">def</span> <span class="pl-en">foo</span>():
        <span class="pl-k">pass</span>
    <span class="pl-k">return</span> foo</pre></div>

<p>Here indenting the comment (which was at column 0) is the expected behavior.</p>

<p>So IMO this depends when too much on style and meaning to get a logic that will always Do the Right Thing™.</p>

<p>Though, as in your case indeed you don't want it, maybe it could be added, especially if a plugin could do this.</p>

<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/issues/674#issuecomment-145517324">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ_laBBk6NbLQH09-xNuVoA_qpUsiks5o4mlmgaJpZM4GIoC2.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/issues/674#issuecomment-145517324"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>