Sublime Forum

256 KB Copy/Paste problem (limit) [SOLVED]

#1

Hello all!
I can’t copy more than 256.0 KB from Sublime Text 3 to eg. Kwrite or Kate editor under Linux.
Tests conducted:
File size <= 256KB - Copy/Paste works between ST3, Kwrite and Kate. No issues at all, no matter in which editor text file was open in which was copied or in which one is pasted. Clipboard shows copied data.

File size > 256KB (eg. 1.5MB)

  1. Loaded into Kate/Kwrite - Copy/Paste works between all editors:
    [C: Kate -> P: Kwrite: Everything OK]
    [C: Kate -> P: ST3: Everything OK]
    [C: Kwrite -> P: Kate: Everything OK]
    [C: Kwrite -> P: ST3: Everything OK]

  2. Loaded into ST3 - Copy from ST3, Paste to Kate/Kwrite - No data; Paste to ST3 (tab to tab) - OK.
    [C: ST3 -> P: Kate: No data]
    [C: ST3 -> P: Kwrite: No data]
    [C: ST3 -> P: ST3: Everything OK]

Linux: OpenSuse Leap 42.3 and OpenSuse Leap 15.2.
Sublime Text 3: Version 3.2.2, Build 3211

Tracing Clipboard under Linux shows that CTRL+C with more than 256KB FROM ST3 is not copied on Clipboard at all, but 1.5MB CTRL+C from Kate/Kwite is shown in Clipboard. It is not issue in Clipboard size limit.
It seems that path ST3->Clipboard is broken if file is larger than exactly 256KB, but C/P inside Sublime3 works even though data is NOT sent to Linux Clipboard. Like ST3 has some kind of “internal clipboard” with no size limit for C/P between itself and is bypassing Linux Clipboard.

Anyone has any idea why ST3 does not copy data to Clipboard if data is bigger than 256KB?

0 Likes

#2

We don’t have any hard limits nor an internal clipboard. Sublime Text just uses gtk_clipboard_set_text with the full text you have selected. Would you be able to test with another app that uses GTK, for instance gedit?

0 Likes

#3

With Gedit - everything works.
Even worse - in openSUSE 42.3 everything works now with Kate and Kwrite as well.
I apologize for raising bogus question. Seems like there are some issues with clipboard, but not with Sublime, Kate, KWrite or Gedit.
Thank you for your help @bschaaf!

0 Likes