<p>The detection width is set by a heuristic based on a "factored most common" and is not language specific.  With a heuristic there will always be situations where it will get it wrong.  In particular a language like Python tends to have most indents at a multiple of the minimum, so it is likely to be most at risk.</p>

<p>The most accurate method would be to make it language dependent, especially for Python where indent is syntax.</p>

<p>But that would need support for language specific capabilities to be added via plugins since we do not want to hard code language specific features for all the number of languages we support.  That plugin capability has been discussed, but does not exist at the moment.</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#issuecomment-214265851">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ64rpDf86ezejB59XfyVxB8tWpyVks5p7J8ygaJpZM4IOxFn.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#issuecomment-214265851"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>