Sublime Forum

ST3 with GNOME 3.24.0 and Wayland clipboard manager issues

#1

ST3 stable or dev versions are not copying text consistently when using primary selection into clipboard managers. If you double click highlight a word it will make it into the primary selection copy buffer one time and a clipboard manager will be able to record the event, but any subsequent copies when using the primary selection it will not record the primary selection copy. Selecting multi lines will result in no text being recorded by the clipboard manager.

Also using Ctrl+C works every time but whatever you have highlighted will be come unselected after you copy it and your cursor will be placed at the line above or below the direction you have highlighted the text.

0 Likes

#2

After further troubleshooting and opening an issue with GPaste, the GPaste maintainer had this to say about this problem:

I’m afraid this is not something that can be fixed in GPaste nor any other clipboard manager.

Here is what happens: When you first select something, an “owner-change” event is emitted, to notify software watching the clipboard activity (and the X server) that sublimetext now “owns” the primary selection. When you then select something else, as sublimetext is still the owner of the selection, it thinks that it doesn’t have to emit that event, it just changes the data il will send when requested. If I select anything outside of sublimetext then select something in sublimetext again, the owner-change events are emitted as expected.

While this makes sense, this is the blocking point here. There is no other way than using owner-change signal to know that the clipboards/primary selection contnetns has changed. Every application just reemits that signal when the selection changes. Some of them are even to eager at this (for example chromium and emacs emits the signal each time you select a new character) resulting in a flood of signals.

I’m afraid the only solution here is for sublimetext to emit the event each time something new is selected.

You can read the full issue submitted to Gpaste here.

2 Likes

#3

I am not sure if this is the best spot for this kind of issue to be reported. @wbond Should I open a GitHub issue for this? Having inconsistent copy and paste with primary selection ST is pretty game breaking. I am not sure how hard it would be to fix this issue or if it is a deeper problem with ST using GTK2 over GTK3.

0 Likes

#4

I’d say log an issue at GitHub, one central place for legit bugs is a good thing :slight_smile:

0 Likes

#5

Yes, definitely. The forum makes it hard to keep track of things like this that need to be fixed, unless they are bugs introduced during the a dev build and identified in the dev build thread.

2 Likes

#6

Sounds good! Here ya go https://github.com/SublimeTextIssues/Core/issues/1691 Thanks for all of your hard work on ST3. :smile:

0 Likes