From 8db86cefa58d5538aec7c4b24cd19e8f9f47d8d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 13 Aug 2025 13:44:30 +0200 Subject: [PATCH] Revert "status/keyboard: Limit the input method indicator to < 3 grapheme clusters" The change requires support for Intl.Segmenter that was introduced in mozjs-125. RHEL still includes an older gjs release based on mozjs-115, so revert the change. This reverts commit a06400649de640e633247ebbfff56ebbfbda9933. --- js/ui/status/keyboard.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js index df6c51c5d0..68a8044d0d 100644 --- a/js/ui/status/keyboard.js +++ b/js/ui/status/keyboard.js @@ -996,12 +996,6 @@ class InputSourceIndicator extends PanelMenu.Button { } } - _getGraphemeClusters(text = '') { - const segmenter = new Intl.Segmenter(undefined, {granularity: 'grapheme'}); - const segments = [...segmenter.segment(text)].map(o => o.segment); - return segments; - } - _buildPropSubMenu(menu, props) { if (!props) return; @@ -1025,8 +1019,7 @@ class InputSourceIndicator extends PanelMenu.Button { let currentSource = this._inputSourceManager.currentSource; if (currentSource) { let indicatorLabel = this._indicatorLabels[currentSource.index]; - const graphemeClusters = this._getGraphemeClusters(text); - if (graphemeClusters.length > 0 && graphemeClusters.length < 3) + if (text && text.length > 0 && text.length < 3) indicatorLabel.set_text(text); } } -- 2.50.1