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.
The incriminated code is in `glatex_structure_lvlup()`: an undo action is started unconditionally, but ended conditionally. That is, if `utils_string_replace_all()` returns 0 replacement for all `GLATEX_STRUCTURE`s, the undo grouping won't be ended.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/issues/455
I guess this will fix it, doesn't it? diff --git a/geanylatex/src/latexstructure.c b/geanylatex/src/latexstructure.c ``` index b06a9d2..f16cd38 100644 --- a/geanylatex/src/latexstructure.c +++ b/geanylatex/src/latexstructure.c @@ -94,11 +94,10 @@ void glatex_structure_lvlup(void) haystack = NULL; sci_replace_sel(doc->editor->sci, tmp); g_free(tmp); - sci_end_undo_action(doc->editor->sci); break; } } - + sci_end_undo_action(doc->editor->sci); if (haystack != NULL) g_string_free(haystack, TRUE); }
```
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/issues/455#issuecomment-228558336
@frlan yes something like that would fix it
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/issues/455#issuecomment-228561133
Closed #455 via b879af263f51373aa1afb649b91e4ae585ff8bb7.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/issues/455#event-704077685
github-comments@lists.geany.org