@scresto09 commented on this pull request.
> @@ -162,14 +163,14 @@ void cmd_del_word_left(CmdContext *c, CmdParams *p) void cmd_undo(CmdContext *c, CmdParams *p) { gint i; - gint pos = SSM(p->sci, SCI_GETCURRENTPOS, 0, 0); + start_undo(c); for (i = 0; i < p->num; i++) { if (!SSM(p->sci, SCI_CANUNDO, 0, 0)) break; SSM(p->sci, SCI_UNDO, 0, 0); } OK, I tried to refactor the code [63b7e25](https://github.com/geany/geany-plugins/pull/1328/commits/63b7e25242e485448c81185eadabab38d7a65b52). But `excmd_undo` cannot simply call `cmd_undo` because of the use of `CmdParams` parameter. So I moved this code into a new `undo_apply` function which is called by `cmd_undo` and `excmd_undo`. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1328#discussion_r1608531487 You are receiving this because you are subscribed to this thread. Message ID: <geany/geany-plugins/pull/1328/review/2068960...@github.com>