Bug#1109430: unblock: gnome-text-editor/48.3-3
Package: release.debian.org
Severity: normal
X-Debbugs-Cc: gnome-text-editor@packages.debian.org
Control: affects -1 + src:gnome-text-editor
User: release.debian.org@packages.debian.org
Usertags: unblock
Please unblock package gnome-text-editor. As with other unblocks, this
could turn into a trixie-pu request if it's too late for 13.0.
[ Reason ]
New upstream bugfix release
[ Impact ]
When automatically guessing a document title from the first line of an
unsaved text file, previous versions would treat non-alphanumeric
Unicode codepoints as whitespace and replace them with spaces, which
breaks scripts that use composing characters and require letter-shaping
(the one mentioned upstream was Devanagari, Arabic might also be
affected).
The cursor position was shown by counting characters, which mis-counted
tabs (a byte advances the cursor by multiple spaces) and combining
characters (a codepoint that does not advance the cursor).
The text editor was meant to inhibit logout until any unsaved changes
were saved or explicitly discarded, but this functionality was broken by
subtleties of the startup sequence.
"Save as" didn't update the document name in the Properties panel.
[ Tests ]
Briefly tested manually. Other distributions like Fedora are already
shipping this version.
[ Risks ]
Key package, default text editor for our default desktop environment.
I don't routinely use this text editor (I'm mainly a vim user), so my
testing was fairly superficial, and similarly most other GNOME
developers probably use a more fully-featured programmers' editor like
vim, emacs, GNOME Builder or gedit.
[ Checklist ]
[x] all changes are documented in the d/changelog
[x] I reviewed all changes and I approve them
[x] attach debdiff against the package in testing
(filtered to exclude translations)
unblock gnome-text-editor/48.3-3
debdiff *.dsc | filterdiff -p1 -x'po/*.po'
diff -Nru gnome-text-editor-48.2/data/org.gnome.TextEditor.metainfo.xml.in.in gnome-text-editor-48.3/data/org.gnome.TextEditor.metainfo.xml.in.in
--- gnome-text-editor-48.2/data/org.gnome.TextEditor.metainfo.xml.in.in 2025-03-24 21:54:27.000000000 +0000
+++ gnome-text-editor-48.3/data/org.gnome.TextEditor.metainfo.xml.in.in 2025-05-29 21:10:37.000000000 +0100
@@ -51,6 +51,7 @@
</supports>
<releases>
+ <release version="48.3" date="2025-05-29"/>
<release version="48.2" date="2025-03-24"/>
<release version="48.1" date="2025-03-17"/>
<release version="48.0" date="2025-03-15"/>
diff -Nru gnome-text-editor-48.2/debian/changelog gnome-text-editor-48.3/debian/changelog
--- gnome-text-editor-48.2/debian/changelog 2025-05-03 08:04:22.000000000 +0100
+++ gnome-text-editor-48.3/debian/changelog 2025-07-14 11:30:05.000000000 +0100
@@ -1,3 +1,34 @@
+gnome-text-editor (48.3-3) unstable; urgency=medium
+
+ * Team upload
+ * Expand description of upstream changes in previous changelog entry
+ * d/watch: Only watch for 48.x releases
+ * d/gbp.conf: Use upstream/48.x branch for trixie
+ * Upload to unstable
+
+ -- Simon McVittie <smcv@debian.org> Mon, 14 Jul 2025 11:30:05 +0100
+
+gnome-text-editor (48.3-2) experimental; urgency=medium
+
+ * New upstream bugfix release
+ - In tab titles, don't add spaces between non-Latin characters, fixing
+ rendering of e.g. Devanagari
+ (gnome-text-editor#793 upstream)
+ - When showing cursor position, use visual column (e.g. tabs count as
+ multiple spaces and combining characters don't count), rather than
+ simply counting characters
+ (gnome-text-editor#799 upstream)
+ - Delay initialization of gtksourceview until we have a valid app ID,
+ so that unsaved changes can inhibit logout via xdg-desktop-portal
+ as intended
+ (gnome-text-editor#804 upstream)
+ - Update document name in Properties panel after "Save as"
+ (gnome-text-editor#806 upstream)
+ - Fix a memory leak
+ - Translation updates
+
+ -- Jeremy Bícha <jbicha@ubuntu.com> Fri, 06 Jun 2025 14:47:00 -0400
+
gnome-text-editor (48.2-2) unstable; urgency=medium
* Team upload
diff -Nru gnome-text-editor-48.2/debian/gbp.conf gnome-text-editor-48.3/debian/gbp.conf
--- gnome-text-editor-48.2/debian/gbp.conf 2025-05-03 06:20:20.000000000 +0100
+++ gnome-text-editor-48.3/debian/gbp.conf 2025-07-14 11:30:05.000000000 +0100
@@ -1,7 +1,7 @@
[DEFAULT]
pristine-tar = True
debian-branch = debian/latest
-upstream-branch = upstream/latest
+upstream-branch = upstream/48.x
[buildpackage]
sign-tags = True
diff -Nru gnome-text-editor-48.2/debian/watch gnome-text-editor-48.3/debian/watch
--- gnome-text-editor-48.2/debian/watch 2025-05-03 06:20:20.000000000 +0100
+++ gnome-text-editor-48.3/debian/watch 2025-07-14 11:30:05.000000000 +0100
@@ -1,4 +1,4 @@
version=4
opts="searchmode=plain, uversionmangle=s/\.(alpha|beta|rc)/~$1/, downloadurlmangle=s|cache.json||" \
https://download.gnome.org/sources/@PACKAGE@/cache.json \
- [\d.]+/@PACKAGE@-([\d.]+\.?(?:beta|rc)?[\d.]*)@ARCHIVE_EXT@
+ 48/@PACKAGE@-([\d.]+\.?(?:beta|rc)?[\d.]*)@ARCHIVE_EXT@
diff -Nru gnome-text-editor-48.2/meson.build gnome-text-editor-48.3/meson.build
--- gnome-text-editor-48.2/meson.build 2025-03-24 21:54:27.000000000 +0000
+++ gnome-text-editor-48.3/meson.build 2025-05-29 21:10:37.000000000 +0100
@@ -1,5 +1,5 @@
project('gnome-text-editor', 'c',
- version: '48.2',
+ version: '48.3',
meson_version: '>= 0.60.0',
default_options: [ 'warning_level=2', 'c_std=gnu17' ],
)
diff -Nru gnome-text-editor-48.2/NEWS gnome-text-editor-48.3/NEWS
--- gnome-text-editor-48.2/NEWS 2025-03-24 21:54:27.000000000 +0000
+++ gnome-text-editor-48.3/NEWS 2025-05-29 21:10:37.000000000 +0100
@@ -1,3 +1,12 @@
+# Text Editor 48.3
+
+ * Fix visual column position in overlay label
+ * Defer gtk/gsv initialization to GtkApplication startup so that
+ GApplication may determine proper app-id for process without
+ relying on systemd/dbus conventions
+ * Fix name in properties panel after save-as
+ * Translation updates
+
# Text Editor 48.2
* Break out of recursive Policy-Kit authorization requests from
diff -Nru gnome-text-editor-48.2/po/LINGUAS gnome-text-editor-48.3/po/LINGUAS
--- gnome-text-editor-48.2/po/LINGUAS 2025-03-24 21:54:27.000000000 +0000
+++ gnome-text-editor-48.3/po/LINGUAS 2025-05-29 21:10:37.000000000 +0100
@@ -47,6 +47,7 @@
th
tr
uk
+uz
vi
zh_CN
zh_TW
diff -Nru gnome-text-editor-48.2/src/editor-application.c gnome-text-editor-48.3/src/editor-application.c
--- gnome-text-editor-48.2/src/editor-application.c 2025-03-24 21:54:27.000000000 +0000
+++ gnome-text-editor-48.3/src/editor-application.c 2025-05-29 21:10:37.000000000 +0100
@@ -332,6 +332,8 @@
G_APPLICATION_CLASS (editor_application_parent_class)->startup (application);
+ gtk_source_init ();
+
display = gdk_display_get_default ();
self->recoloring = gtk_css_provider_new ();
gtk_style_context_add_provider_for_display (display,
diff -Nru gnome-text-editor-48.2/src/editor-document.c gnome-text-editor-48.3/src/editor-document.c
--- gnome-text-editor-48.2/src/editor-document.c 2025-03-24 21:54:27.000000000 +0000
+++ gnome-text-editor-48.3/src/editor-document.c 2025-05-29 21:10:37.000000000 +0100
@@ -618,6 +618,17 @@
}
static void
+editor_document_notify_location_cb (EditorDocument *self,
+ GParamSpec *pspec,
+ GtkSourceFile *file)
+{
+ g_assert (EDITOR_IS_DOCUMENT (self));
+ g_assert (GTK_SOURCE_IS_FILE (file));
+
+ g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_FILE]);
+}
+
+static void
editor_document_constructed (GObject *object)
{
EditorDocument *self = (EditorDocument *)object;
@@ -902,6 +913,12 @@
self->file = gtk_source_file_new ();
self->draft_id = g_uuid_string_random ();
+ g_signal_connect_object (self->file,
+ "notify::location",
+ G_CALLBACK (editor_document_notify_location_cb),
+ self,
+ G_CONNECT_SWAPPED);
+
g_signal_connect (self,
"cursor-moved",
G_CALLBACK (editor_document_cursor_moved),
@@ -2203,6 +2220,7 @@
do
{
+ GUnicodeScript script;
gunichar ch;
if (count >= TITLE_MAX_LEN)
@@ -2220,7 +2238,10 @@
break;
}
- if (g_unichar_isspace (ch) || !g_unichar_isalnum (ch))
+ script = g_unichar_get_script (ch);
+
+ if (g_unichar_isspace (ch) ||
+ (((script == G_UNICODE_SCRIPT_COMMON) || (script == G_UNICODE_SCRIPT_LATIN)) && !g_unichar_isalnum (ch)))
{
if (count > TITLE_LAST_WORD_POS)
break;
diff -Nru gnome-text-editor-48.2/src/editor-page.c gnome-text-editor-48.3/src/editor-page.c
--- gnome-text-editor-48.2/src/editor-page.c 2025-03-24 21:54:27.000000000 +0000
+++ gnome-text-editor-48.3/src/editor-page.c 2025-05-29 21:10:37.000000000 +0100
@@ -284,16 +284,11 @@
if (!_editor_document_get_loading (document))
{
- GtkTextMark *insert = gtk_text_buffer_get_insert (GTK_TEXT_BUFFER (document));
- GtkTextIter iter;
-
- g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_POSITION_LABEL]);
-
- gtk_text_buffer_get_iter_at_mark (GTK_TEXT_BUFFER (document), &iter, insert);
-
+ editor_page_get_visual_position (self, &self->cached_line, &self->cached_visual_column);
_editor_position_label_set_position (self->position_label,
- gtk_text_iter_get_line (&iter) + 1,
- gtk_text_iter_get_line_offset (&iter) + 1);
+ self->cached_line + 1,
+ self->cached_visual_column + 1);
+ g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_POSITION_LABEL]);
}
}
@@ -632,14 +627,15 @@
int *position,
GtkText *entry)
{
+ g_autoptr(GString) str = NULL;
const char *text;
- GString *str;
g_assert (EDITOR_IS_PAGE (self));
g_assert (position != NULL);
g_assert (GTK_IS_TEXT (entry));
text = gtk_editable_get_text (GTK_EDITABLE (entry));
+
str = g_string_new (text);
g_string_insert_len (str, *position, new_text, length);
@@ -651,7 +647,7 @@
continue;
g_signal_stop_emission_by_name (entry, "insert-text");
- return;
+ break;
}
}
@@ -1480,17 +1476,14 @@
gchar *
editor_page_dup_position_label (EditorPage *self)
{
- guint line = 0;
- guint column = 0;
-
g_return_val_if_fail (EDITOR_IS_PAGE (self), NULL);
if (_editor_document_get_loading (self->document))
return NULL;
- editor_page_get_visual_position (self, &line, &column);
-
- return g_strdup_printf (_("Ln %u, Col %u"), line + 1, column + 1);
+ return g_strdup_printf (_("Ln %u, Col %u"),
+ self->cached_line + 1,
+ self->cached_visual_column + 1);
}
gboolean
diff -Nru gnome-text-editor-48.2/src/editor-page-private.h gnome-text-editor-48.3/src/editor-page-private.h
--- gnome-text-editor-48.2/src/editor-page-private.h 2025-03-24 21:54:27.000000000 +0000
+++ gnome-text-editor-48.3/src/editor-page-private.h 2025-05-29 21:10:37.000000000 +0100
@@ -63,6 +63,9 @@
GtkEventController *vim;
EditorPositionLabel *position_label;
+ guint cached_line;
+ guint cached_visual_column;
+
guint queued_hide_position;
guint close_requested : 1;
diff -Nru gnome-text-editor-48.2/src/main.c gnome-text-editor-48.3/src/main.c
--- gnome-text-editor-48.2/src/main.c 2025-03-24 21:54:27.000000000 +0000
+++ gnome-text-editor-48.3/src/main.c 2025-05-29 21:10:37.000000000 +0100
@@ -93,9 +93,6 @@
check_early_opts (&argc, &argv, &standalone, &exit_after_startup);
- gtk_init ();
- gtk_source_init ();
-
app = _editor_application_new (standalone);
if (exit_after_startup)
Reply to: