<p>When I was making the sources of our ctags use tabs-only indentation, I used Geany's "replace tabs with spaces" and "replace spaces with tabs". However, after using it I realized that every time I also had to set the document's indentation type manually which was a bit annoying and unnecessary. IMO when doing replacements of tabs<->spaces in the whole document, we should set also the document's indentation type to the new type. The first patch does this.</p>

<p>The second patch is just kind of cleanup which makes the implementation of undo() and redo() more similar to each other.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/geany/geany/pull/1161'>https://github.com/geany/geany/pull/1161</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Set document indent type when replacing tabs<->spaces in the whole document</li>
  <li>Make UNDO_EOL/UNDO_INDENT always precede the attached Scintilla action</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/1161/files#diff-0">src/document.c</a>
    (64)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/1161/files#diff-1">src/documentprivate.h</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/1161/files#diff-2">src/editor.c</a>
    (36)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/geany/geany/pull/1161.patch'>https://github.com/geany/geany/pull/1161.patch</a></li>
  <li><a href='https://github.com/geany/geany/pull/1161.diff'>https://github.com/geany/geany/pull/1161.diff</a></li>
</ul>

<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/1161">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ4OIzyloz3g5UxhBO_NWuQGwBiEXks5qcPhEgaJpZM4JcDh-">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ39ft-agnI3eV27ewDP4vrQc0JgFks5qcPhEgaJpZM4JcDh-.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/1161"></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://assets-cdn.github.com/images/modules/aws/aws-bg.jpg","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":"DESCRIPTION","message":"Set indent type when using \"replace tabs with spaces\" (plus the opposite direction) (#1161)"}],"action":{"name":"View Pull Request","url":"https://github.com/geany/geany/pull/1161"}}}</script>