<p>I have "Detect width from file" option checked in preferences. But geany often fails to detect indentation width for some python files, for example:</p>

<div class="highlight highlight-source-python"><pre><span class="pl-k">import</span> unittest


<span class="pl-k">class</span> <span class="pl-en">MyTestCase</span>(<span class="pl-e">unittest</span>.<span class="pl-e">TestCase</span>):

    <span class="pl-k">def</span> <span class="pl-en">test_test</span>(<span class="pl-smi"><span class="pl-smi">self</span></span>):
        <span class="pl-c"># test</span>
        <span class="pl-c"># test</span>
        <span class="pl-c"># test</span>
        <span class="pl-k">pass</span></pre></div>

<p>For this file indentation is set to 8 spaces (should be 4).</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 or <a href="https://github.com/geany/geany/issues/1008">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ1Znmkf8IgvO7xdWOJPNnEhHzg2Uks5p7IoCgaJpZM4IOxFn.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/1008"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>