branch: elpa/subed
commit 0a20cef9299441807d4128242450905528d6d167
Author: Random User <rnd...@posteo.de>
Commit: Random User <rnd...@posteo.de>

    Run subtitle-time-adjusted-hook only if time was adjusted
---
 subed/subed-srt.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/subed/subed-srt.el b/subed/subed-srt.el
index e667398..61a2d2b 100644
--- a/subed/subed-srt.el
+++ b/subed/subed-srt.el
@@ -304,8 +304,8 @@ Return point or nil if there is no previous subtitle."
       (save-excursion
         (subed-srt-jump-to-subtitle-time-start)
         (when (looking-at subed-srt--regexp-timestamp)
-          (replace-match (subed-srt--msecs-to-timestamp msecs-new))))))
-  (subed-srt--run-subtitle-time-adjusted-hook))
+          (replace-match (subed-srt--msecs-to-timestamp msecs-new))))
+      (subed-srt--run-subtitle-time-adjusted-hook))))
 
 (defun subed-srt--adjust-subtitle-stop-relative (msecs)
   "Add MSECS milliseconds to stop time (use negative value to subtract)."
@@ -315,8 +315,8 @@ Return point or nil if there is no previous subtitle."
       (save-excursion
         (subed-srt-jump-to-subtitle-time-stop)
         (when (looking-at subed-srt--regexp-timestamp)
-          (replace-match (subed-srt--msecs-to-timestamp msecs-new))))))
-  (subed-srt--run-subtitle-time-adjusted-hook))
+          (replace-match (subed-srt--msecs-to-timestamp msecs-new))))
+      (subed-srt--run-subtitle-time-adjusted-hook))))
 
 (defun subed-srt--run-subtitle-time-adjusted-hook ()
   "Run `subed-subtitle-time-adjusted-hook' functions with

Reply via email to