From 861a39f4b989f3b7a526d014e4f0bf44c30f25f2 Mon Sep 17 00:00:00 2001
From: Hugo Wetterberg <hugo@wetterberg.nu>
Date: Tue, 18 Feb 2025 13:39:02 +0100
Subject: [PATCH] prevent hyphenation confirmation dialog when not using GUI

---
 scribus/hyphenator.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git scribus/hyphenator.cpp scribus/hyphenator.cpp
index c7b7e3856..30657ba5d 100644
--- scribus/hyphenator.cpp
+++ scribus/hyphenator.cpp
@@ -188,7 +188,7 @@ void Hyphenator::slotHyphenate(PageItem* it)
 			// TODO: support non-standard hyphenation, see hnj_hyphen_hyphenate2 docs
 			if (!hnj_hyphen_hyphenate2(m_hdict, te.data(), te.length(), buffer, nullptr, &rep, &pos, &cut))
 			{
-	  			int i = 0;
+				int i = 0;
 				buffer[te.length()] = '\0';
 				bool hasHyphen = false;
 				for (i = 1; i < wordLower.length() - 1; ++i)
@@ -214,7 +214,7 @@ void Hyphenator::slotHyphenate(PageItem* it)
 				{
 					if (!hasHyphen)
 						it->itemText.hyphenateWord(startC + firstC, wordLower.length(), nullptr);
-					else if (m_automatic)
+					else if (m_automatic || !ScCore->usingGUI())
 					{
 						if (specialWords.contains(word))
 						{
-- 
2.48.1

