Skip to content

Commit 48a9bec

Browse files
vkarehraveit65
authored andcommitted
Copy equation as ASCII text
This ensures compatibility with pasting into software that cannot handle Unicode characters (e.g. LibreOffice)
1 parent 6db315a commit 48a9bec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/math-equation.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,14 +416,14 @@ math_equation_copy(MathEquation *equation)
416416
{
417417
GtkTextIter start, end;
418418
gchar *text;
419-
419+
420420
g_return_if_fail(equation != NULL);
421421

422422
if (!gtk_text_buffer_get_selection_bounds(GTK_TEXT_BUFFER(equation), &start, &end))
423423
gtk_text_buffer_get_bounds(GTK_TEXT_BUFFER(equation), &start, &end);
424424

425425
text = gtk_text_buffer_get_text(GTK_TEXT_BUFFER(equation), &start, &end, FALSE);
426-
gtk_clipboard_set_text(gtk_clipboard_get(GDK_NONE), text, -1);
426+
gtk_clipboard_set_text(gtk_clipboard_get(GDK_NONE), g_str_to_ascii (text, "C"), -1);
427427
g_free(text);
428428
}
429429

0 commit comments

Comments
 (0)