branch: elpa/subed commit a6300b29b127badb2b19d5a04a6a83043cdf1724 Author: Random User <rnd...@posteo.de> Commit: Random User <rnd...@posteo.de>
Don't regenerate IDs immediately after inserting subtitle(s) When M-i is held down for a few seconds, the ID regeneration can sometimes end up in an infinite(?) loop for some reason. Only scheduling the regeneration to be done in 100ms and cancelling that call if another subtitle is inserted within the next 100ms seems to fix that issue. This also makes inserting subtitles much quicker. --- subed/subed-srt.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subed/subed-srt.el b/subed/subed-srt.el index 2f69b3b..cfcad80 100644 --- a/subed/subed-srt.el +++ b/subed/subed-srt.el @@ -445,7 +445,7 @@ nil if nothing was adjusted." (when (looking-at "^[[:blank:]]*$") (forward-line -1) (kill-whole-line))) - (subed-srt--regenerate-ids) + (subed-srt--regenerate-ids-soon) (subed-srt--jump-to-subtitle-text)))) (defun subed-srt--subtitle-kill ()