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

Bug: double clicking needs tons of undos #20

Open
ouuan opened this issue Dec 12, 2019 · 1 comment
Open

Bug: double clicking needs tons of undos #20

ouuan opened this issue Dec 12, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@ouuan
Copy link
Contributor

ouuan commented Dec 12, 2019

  1. write three "foo;"s in the editor;
  2. double click the word "foo", the three "foo"s will be highlighted.
  3. Press "Ctrl+Z" to undo the double-clicking, you need six "Ctrl+Z"s in total.

Double-clicking for highlighting the same words shouldn't affect the undo history.

OS: Windows 10

I'm using QCodeEditor in coder3101/cp-editor2.

@Megaxela
Copy link
Owner

I guess it's QTextEditor bug. But I'll try to find some workaround.

@Megaxela Megaxela added the bug Something isn't working label Dec 28, 2019
ouuan added a commit to cpeditor/QCodeEditor that referenced this issue Jan 30, 2020
The occurrences were framed, but it sometimes cost a long time which is
perceptible by the users. What's worse, it sometimes needs many undos,
which is described in Megaxela#20.

After this change, the occurrences are underlined other than framed,
and the words are find by whole-word rule. This is fast and doesn't
need any undos.

It may be possible to use frames which is more beatiful without being
slow or modifying the text, but I'm just lazy to implement it.
ouuan added a commit to cpeditor/QCodeEditor that referenced this issue Jan 30, 2020
The occurrences were framed, but it sometimes cost a long time which is
perceptible by the users. What's worse, it sometimes needs many undos,
which is described in Megaxela#20.

After this change, the occurrences are underlined other than framed,
and the words are find by whole-word rule. This is fast and doesn't
need any undos.

It may be possible to use frames which is more beatiful without being
slow or modifying the text, but I'm just lazy to implement it.
ouuan added a commit to cpeditor/QCodeEditor that referenced this issue Feb 1, 2020
The occurrences were framed, but it sometimes cost a long time which is
perceptible by the users. What's worse, it sometimes needs many undos,
which is described in Megaxela#20.

After this change, the occurrences are underlined other than framed,
and the words are find by whole-word rule. This is fast and doesn't
need any undos.

It may be possible to use frames which is more beatiful without being
slow or modifying the text, but I'm just lazy to implement it.
knarfS pushed a commit to knarfS/QCodeEditor that referenced this issue Aug 23, 2020
endl is deprecated in Qt 5.15

Since QCodeEditor is a library, it's better to support Qt 5.12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants