sublime_text
sublime_text copied to clipboard
Calls to sublime.Window.settings().set() work only sporadically on Ubuntu 22.04.1 LTS
Description of the bug
I use a plugin that I wrote myself as an integral part of my workflow. Recently, I was setting up a new installation of Ubuntu on an existing machine with a new hard drive. I installed Ubuntu 22.04.1 LTS with Sublime 4126 and installed the package I wrote as I usually do, by cloning the tip of the master branch on GitHub (not the version on Package Control) to the folder that Sublime opens when you click "Preferences>Browse Packages...".
I can confirm that Sublime recognizes the plugin within the ctrl+` menu and it is modifying Sublime's behavior, however behavior is broken, and the self-same python code that runs the plugin works fine on an older machine that uses the same version of Sublime on an earlier version of Ubuntu. This older machine runs Ubuntu 20.04 4 LTS.
The problem appears to occur during execution for a part of plugin code that sets the value for a variable using WindowCommand.window.settings().set(). I set this variable to modify the behavior of subsequent commands. Previously this solution has worked without flaw for many years and across many machines, the plugin code that is responsible for this behavior has undergone no significant changes and is very stable, and it has worked on many instances of Ubuntu, but for some reason when running Ubuntu 22 it produces unpredictable behavior. Most often, running any of the commands that call WindowCommand.window.settings().set() will result in no further keystrokes being registered, and Sublime will have to be restart. This won't happen all the time, though. Sometimes it will still allow keystrokes, but it will act as if a different value was assigned to the variable in memory. Sometimes, it will act as if nothing happens. However there never seems to be a case where it assigns to the variable as intended, and I see no pattern to help predict which one of these situations will occur.
I initially thought this could be a problem with Snap, since I installed Sublime on the new machine using Snap, however I've also tried installing Sublime from instructions on the project website, and the same problem manifests.
This issue is right now completely preventing me from using Sublime on this machine, I've really come to rely on that plugin.
Steps to reproduce
- Start ST 4126 in safe mode running Ubuntu 22.04.1 LTS
- Go to this github project and press "Code>Download ZIP". A zip file will download
- Click "Preferences>Browse Packages..." and extract the contents of the zip file to the folder that displays.
- Return to Sublime and open a document.
- Place your cursor on the leftmost side of a line with lots of text.
- Return to Sublime and press "ctrl+;" followed by "ctrl+l"
Expected behavior
The cursor should jump to the end of the line
Actual behavior
One of several things occur. Most often, nothing will happen, and subsequent attempts to type anything at the keyboard will not register with ST. Other times, it will advance ahead only by a single character or word.
Sublime Text build number
4126
Operating system & version
Ubuntu 22.04.1 LTS
(Linux) Desktop environment and/or window manager
GNOME 42
Additional information
No response
OpenGL context information
No response
It's working as expected on my end. Does it happen in the latest development build of ST?
Sorry for the late reply, I was out traveling. This should be the latest stable build of ST as of when I wrote the original post. Since then I have downgraded my OS to Ubuntu 21.10 LTS and the problem is not occuring in that environment.
Considering neither of us are reproducing this I'm going to close the issue.