Primary selection not working (text editor)
You can not select text to copy it to the primary selection within the text editor under X11.
Selecting text outside from text editor and then pasting it into text editor with middle-mouse button is working.
The clipboard is your regular clipboard – it's used for explicit "Cut", "Copy", and "Paste" operations. You copy to it with Ctrl+C or "Edit→Copy", paste with Ctrl+V or "Edit→Paste", and it can hold various kinds of data (text, image, files).
In contrast, the primary selection is automatic, and as the name implies it holds whatever text you have selected last. [...] You usually paste from primary selection by middle-clicking the mouse. (For mice with a scrollwheel, the wheel is also the middle button. For mice or touchpads with only two buttons, pressing both at once emulates the middle button.)
https://www.freedesktop.org/wiki/Specifications/ClipboardsWiki/
https://wiki.archlinux.org/title/clipboard#Selections