[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/subed 87b3823 353/389: subed-split-subtitle works at the b
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/subed 87b3823 353/389: subed-split-subtitle works at the beginning or end of subtitle text |
Date: |
Fri, 3 Dec 2021 11:00:56 -0500 (EST) |
branch: elpa/subed
commit 87b382358eb59abb2aadb35c94804a00fc1285a8
Author: Sacha Chua <sacha@sachachua.com>
Commit: Random User <rndusr@posteo.de>
subed-split-subtitle works at the beginning or end of subtitle text
* subed/subed-common.el (subed-split-subtitle): Allow splitting at the
beginning or end of subtitle text.
---
subed/subed-common.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/subed/subed-common.el b/subed/subed-common.el
index e99beea..d16f5e0 100644
--- a/subed/subed-common.el
+++ b/subed/subed-common.el
@@ -637,17 +637,17 @@ Update the end timestamp accordingly."
(let* ((end-timestamp (subed-subtitle-msecs-stop))
(orig (point))
(text-beg (save-excursion (subed-jump-to-subtitle-text)))
- (text-end (save-excursion (subed-jump-to-subtitle-end)))
- (text (buffer-substring orig (save-excursion
(subed-jump-to-subtitle-end) (point)))))
+ (text-end (save-excursion (or (subed-jump-to-subtitle-end) (point))))
+ (text (buffer-substring orig text-end)))
(unless subed-mpv-playback-position
(error "Not playing back in MPV"))
- (unless (and text-beg text-end (> orig text-beg) (< orig text-end))
+ (unless (and text-beg text-end (>= orig text-beg) (<= orig text-end))
(error "Not in the middle of subtitle text"))
(when (or (> subed-mpv-playback-position end-timestamp)
(< subed-mpv-playback-position (subed-subtitle-msecs-start)))
(error "Not in the currently playing subtitle segment"))
(subed-set-subtitle-time-stop subed-mpv-playback-position)
- (delete-region (point) (subed-jump-to-subtitle-end))
+ (delete-region (point) text-end)
(subed-append-subtitle nil subed-mpv-playback-position end-timestamp
(string-trim text))
(subed-regenerate-ids-soon)))
- [nongnu] elpa/subed 9f55817 369/389: Wrap start/stop calculating functions in `ignore-errors', (continued)
- [nongnu] elpa/subed 9f55817 369/389: Wrap start/stop calculating functions in `ignore-errors', ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed beda7dc 371/389: Add functions to insert HTML-like tags, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed c23dd84 373/389: Add info about the new features to README.org, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 6a5802c 374/389: Add video movement per frame, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 828764f 375/389: Change keybindings and use a transient keymap, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 5de6f21 377/389: Add msecs-to-timestamp as a common function, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed b42f563 378/389: Add audio extensions, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 6b1a6f2 367/389: Add computing and displaying characters per second, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 3ba295b 336/389: Fix "service name too long", ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 961e5eb 343/389: More subed-vtt fixes: require subed-vtt, validate better, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 87b3823 353/389: subed-split-subtitle works at the beginning or end of subtitle text,
ELPA Syncer <=
- [nongnu] elpa/subed 3b4b56a 384/389: Merge pull request #49 from sachac/fix-vtt-spaces, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed bee9e63 342/389: subed-vtt: Fix syncing point with player, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 016c6a5 363/389: subed-split-subtitle: Handle more cases, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 6164f88 380/389: Keep track of video being played, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 70561f0 381/389: Make hours optional in VTT files, following the spec, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed bf3e832 382/389: Check if subed--cps-overlay exists before trying to update it, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed b6e08c2 383/389: Handle spaces in between VTT subtitles, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 564b6fe 386/389: Add preliminary support for comments in VTT files, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed d5751c5 334/389: Change default faces to inherit color values, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 65ed21c 350/389: Add tests/test-subed-vtt.el, ELPA Syncer, 2021/12/03