From 1141051716933007aca8953d15b44d00ae12b072 Mon Sep 17 00:00:00 2001 From: Miodec Date: Mon, 25 Nov 2024 17:44:25 +0100 Subject: fix(custom text): limit being set to incorrect value when using pipe delimiter and simple text mode !nuf --- frontend/src/ts/modals/custom-text.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/ts/modals/custom-text.ts b/frontend/src/ts/modals/custom-text.ts index 37b07ae3a..ec0cd14eb 100644 --- a/frontend/src/ts/modals/custom-text.ts +++ b/frontend/src/ts/modals/custom-text.ts @@ -369,7 +369,10 @@ function apply(): void { CustomText.setPipeDelimiter(state.customTextPipeDelimiter); CustomText.setText(text); - if (state.customTextLimits.word !== "") { + if (state.customTextMode === "simple" && state.customTextPipeDelimiter) { + CustomText.setLimitMode("section"); + CustomText.setLimitValue(text.length); + } else if (state.customTextLimits.word !== "") { CustomText.setLimitMode("word"); CustomText.setLimitValue(parseInt(state.customTextLimits.word)); } else if (state.customTextLimits.time !== "") { -- cgit v1.2.3