<p>GeanyLatex may (at least technically, but I think it's a real bug) start an undo action an never end it.  This could break Geany's whole undoing capability when triggered.</p>

<p>The incriminated code is in <code>glatex_structure_lvlup()</code>: an undo action is started unconditionally, but ended conditionally.  That is, if <code>utils_string_replace_all()</code> returns 0 replacement for all <code>GLATEX_STRUCTURE</code>s, the undo grouping won't be ended.</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-plugins/issues/455">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/ABDrJ8TD2kkI8KJWH31U2aK5YM9PjpuXks5qPVNBgaJpZM4I-YAd">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJxmj3WRU5OOTwCRnISKmlBCjxao8ks5qPVNBgaJpZM4I-YAd.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-plugins/issues/455"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>