summaryrefslogtreecommitdiffstats
path: root/Scripts
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2024-07-12 16:08:22 -0700
committeryum <yum.food.vr@gmail.com>2024-07-12 16:08:22 -0700
commitd7307f8b4d7a8871f08c5999e551b9f58d256c1c (patch)
tree395304995a567f6b65b1c95d8e0e943639b941ed /Scripts
parent861df4f98db7c8a87fd11f9081b0c8c6d6d40f29 (diff)
Edge case: initial preview should not have a space added in front of it
God this code is a fucking nightmare
Diffstat (limited to 'Scripts')
-rw-r--r--Scripts/transcribe_v2.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Scripts/transcribe_v2.py b/Scripts/transcribe_v2.py
index 94b8257..ba05dd0 100644
--- a/Scripts/transcribe_v2.py
+++ b/Scripts/transcribe_v2.py
@@ -844,8 +844,9 @@ def transcriptionThread(ctrl: ThreadControl):
if not ctrl.transcript.endswith(' ') and not \
commit.delta.startswith(' '):
commit.delta = ' ' + commit.delta
- if not commit.delta.endswith(' ') and not \
- commit.preview.startswith(' '):
+ if len(commit.delta) > 0 and \
+ (not commit.delta.endswith(' ')) and \
+ (not commit.preview.startswith(' ')):
commit.preview = ' ' + commit.preview
ctrl.transcript += commit.delta