Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selected text is sometimes deleted when text is selected and shift or ctrl key is pressed #112

Open
danieldeankon opened this issue Mar 18, 2023 · 1 comment

Comments

@danieldeankon
Copy link

OS: Linux Mint Debian Edition 4
JuffEd version: v0.10 (installed from the package manager)
Qt version: 5.11.3

Under certain circumstances, I can reliably select text in JuffEd, press the shift or ctrl key, and delete the text as if I had pressed the backspace key. The circumstances seem to be that a text cursor is active in an a program other than JuffEd before I make my selection in JuffEd.

More precisely, the steps to reproduce are:

  1. Open a text file in JuffEd
  2. Write some sample text in JuffEd
  3. Open another program such as a terminal emulator, web browser, etc.
  4. Activate a textbox in the other program by clicking in it so that a text cursor appears in it
  5. While that textbox is still active, select the sample text in JuffEd. (You may have to click on the JuffEd textbox first to make it possible to select text)
  6. Press ctrl or shift
  7. Observe the selected sample text being deleted as if backspace had been pressed

This does not happen in subsequent selections inside JuffEd. I would have to activate a textbox in another program and return to JuffEd to observe the buggy behaviour again.

@danieldeankon
Copy link
Author

It also happens when pressing arrow keys in step 6.

I managed to fix the issue without any code changes to JuffEd, but not with a workflow that I would recommend to other people.

  1. The version of the QScintilla library on my system was the latest available version 2.10.4+dfsg-2.1 from package libqscintilla2-qt5-13.
  2. I built QScintilla from source to obtain libqscintilla2_qt5.so.15.1.1
  3. The final step of the recommended build sequence from the QScintilla README.doc was make install, which I ran under sudo to put that binary into /usr/lib/x86_64-linux-gnu/libqscintilla2_qt5.so.15.1.1 (⚠️ circumventing the system's package management)
  4. I renamed my existing /usr/lib/libqscintilla2_qt5.so.13.1.1 to /usr/lib/libqscintilla2_qt5.so.13.1.1.disabled, and same with the existing symlinks pointing to the former (⚠️ circumventing the system's package management)
  5. I created a symlink /usr/lib/libqscintilla2_qt5.so to /usr/lib/x86_64-linux-gnu/libqscintilla2_qt5.so.15.1.1 (⚠️ circumventing the system's package management)
  6. I built JuffEd from source following instructions for 'other distros', not instructions for Debian as there was an error message from dpkg-buildpackage and I didn't pursue that method beyond that. This put the JuffEd binary into /usr/bin/juffed (⚠️ circumventing the system's package management)

Regarding step 7: Instructions to build JuffEd for other distros were to run these starting from a freshly cloned repo's root folder:

$ mkdir build
$ cd build
$ cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=release
$ make
$ sudo make install

Possibly Linux Mint Debian Edition 5 has an updated version of QScintilla libraries that fixes this issue. I did not investigate that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant