mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-14 14:20:21 +00:00
Merge branch 'main' into 'main'
textbuffer: Clear paste point override from empty middle clicks Closes #5530 See merge request GNOME/gtk!6811
This commit is contained in:
commit
0105da3238
@ -3823,11 +3823,20 @@ gtk_text_buffer_paste_clipboard_finish (GObject *source,
|
||||
ClipboardRequest *request_data = data;
|
||||
GtkTextBuffer *src_buffer;
|
||||
GtkTextIter start, end;
|
||||
GtkTextMark *paste_point_override;
|
||||
const GValue *value;
|
||||
|
||||
value = gdk_clipboard_read_value_finish (clipboard, result, NULL);
|
||||
if (value == NULL)
|
||||
return;
|
||||
{
|
||||
/* Clear paste point override from empty middle-click paste */
|
||||
paste_point_override = gtk_text_buffer_get_mark (request_data->buffer,
|
||||
"gtk_paste_point_override");
|
||||
if (paste_point_override != NULL)
|
||||
gtk_text_buffer_delete_mark (request_data->buffer, paste_point_override);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
src_buffer = g_value_get_object (value);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user