sachac / subed

subed is a subtitle editor for Emacs
177 stars 16 forks source link

The looping over period of timestamp do not change instantly after merge with the next subtitle. #63

Closed czqhurricnae closed 1 year ago

czqhurricnae commented 1 year ago

For intance, there are two subtitles:

33
00:03:16,820 --> 00:03:18,560
passenger volumes haven't been as high

34
00:03:18,560 --> 00:03:21,519
as expected with only 84 000 people

When cursor is at numerical order 33 and subed-toggle-loop-over-current-subtitle is ture, MPV loop over the time period of 00:03:16,820 --> 00:03:18,560. Then call subed-merge-dwin, then 34 will be merged into 33, so 33 is going to be:

33
00:03:16,820 --> 00:03:21,519
passenger volumes haven't been as high
as expected with only 84 000 people

But MPV is still looping over the old time period 00:03:16,820 --> 00:03:18,560, no the new one 00:03:16,820 --> 00:03:21,519.

This behavior do not abide the function name subed-toggle-loop-over-current-subtitle.

Versus reverse, the command subed-merge-with-previous behaves what I expected, after merged with previous subtitle, the looping over period is changed instantly to the new merged subtile's start and end timestamp.

sachac commented 1 year ago

Oh, good point! I'll add a test and a fix when I get some time to work on it.

On Mon, Mar 20, 2023, 07:54 czqhurricnae @.***> wrote:

For intance, there are two subtitle:

33 00:03:16,820 --> 00:03:18,560 passenger volumes haven't been as high

34 00:03:18,560 --> 00:03:21,519 as expected with only 84 000 people

When cursor is at numerical order 33 and subed-toggle-loop-over-current-subtitle is ture, MPV loop over the time period of 00:03:16,820 --> 00:03:18,560. The call subed-merge-dwin, then 34 will be merged into 33, so 33 is going to be:

33 00:03:16,820 --> 00:03:21,519 passenger volumes haven't been as high as expected with only 84 000 people

But MPV is still looping over the old time period 00:03:16,820 --> 00:03:18,560, no the new one 00:03:16,820 --> 00:03:21,519.

This behavior do not abide the function name subed-toggle-loop-over-current-subtitle.

Versus reverse, the command subed-merge-with-previous behaves what I expected, after merge with previous subtitle, the looping over period is changed instantly to the new merged subtile's start and end timestamp.

— Reply to this email directly, view it on GitHub https://github.com/sachac/subed/issues/63, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACD7EX7R7S5FKETL5CJ32TW5BAOBANCNFSM6AAAAAAWA7H6AU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

sachac commented 1 year ago

Okay, I think I've fixed it in 1.2.1. Please feel free to reopen this if it doesn't work for you!

czqhurricnae commented 1 year ago

The new commit works perfectly at my computer, thanks to your work so much.