-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
difference between selecting and double clicking words #102
Comments
Is there any chance I can see a screen recording of this? |
I've updated to the newest version and can't exactly reproduce what I described above. |
Does this still happen if you reboot (or just restart gnome)? I would love to see the database file if you're willing to share. If not, I could give you a patch to apply that has a bunch of debug logging. |
Yes, after reboot same reaction. (both these screen recordings were made with gnome under X not wayland) I'd prefer to do the patch route over the database dump. I might learn something in the |
Sounds good, here you go. Several things are broken in your latest video: the Subject: [PATCH] Debug logs
---
Index: extension.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/extension.js b/extension.js
--- a/extension.js (revision 5aba9adb60f22124d2d42b9bd10eee04f8dc8377)
+++ b/extension.js (date 1664324039960)
@@ -347,11 +347,13 @@
}
_addEntry(entry, selectEntry, updateClipboard, insertIndex) {
+ log(Me.uuid, "Adding entry", JSON.stringify(entry, ["id", "diskId", "type", "text", "favorite"]), selectEntry, updateClipboard, insertIndex, this.activeHistoryMenuItems);
if (!entry.favorite && this.activeHistoryMenuItems >= PAGE_SIZE) {
const items = this.historySection._getMenuItems();
const item = items[items.length - 1];
this._rewriteMenuItem(item, entry);
this.historySection.moveMenuItem(item, 0);
+ log(Me.uuid, "Rewrote menu item")
if (selectEntry) {
this._selectEntry(entry, updateClipboard);
@@ -539,6 +541,7 @@
}
_removeEntry(entry, fullyDelete) {
+ log(Me.uuid, "Deleting entry", JSON.stringify(entry, ["id", "diskId", "type", "text", "favorite"]), fullyDelete);
if (fullyDelete) {
entry.detach();
@@ -572,6 +575,7 @@
}
_selectEntry(entry, updateClipboard, triggerPaste) {
+ log(Me.uuid, "Selecting entry", JSON.stringify(entry, ["id", "diskId", "type", "text", "favorite"]), updateClipboard, triggerPaste);
this.currentlySelectedEntry?.menuItem?.setOrnament(PopupMenu.Ornament.NONE);
this.currentlySelectedEntry = entry;
@@ -842,6 +846,7 @@
}
_processClipboardContent(text) {
+ log(Me.uuid, "_processClipboardContent", this._debouncing, `text=${text}`);
if (this._debouncing > 0) {
this._debouncing--;
return;
@@ -860,6 +865,7 @@
if (entry) {
const isFirst =
entry === this.entries.last() || entry === this.favoriteEntries.last();
+ log(Me.uuid, "Entry found", JSON.stringify(entry, ["id", "diskId", "type", "text", "favorite"]), isFirst, JSON.stringify(this.currentlySelectedEntry, ["id", "diskId", "type", "text", "favorite"]))
if (!isFirst) {
this._moveEntryFirst(entry);
}
@@ -876,6 +882,7 @@
this.entries.append(entry);
this._addEntry(entry, true, false, 0);
+ log(Me.uuid, "Created new entry", JSON.stringify(entry, ["id", "diskId", "type", "text", "favorite"]))
if (!CACHE_ONLY_FAVORITES) {
Store.storeTextEntry(text);
} To get the logs, apply the patch ( |
I've moved to another country, sorry for the long wait. Will test this out as soon as I can. |
Peek 15-10-2022 16-05.webm I should probably try on a new user account to see if it works OK there. Maybe I messed something up when hacking around. |
Thanks for this!
Yeah, can you try resetting stuff? And are you sure you don't have another program messing around with the clipboard? The logs are just nonsense: they basically show that every time you copy something, the ----s also get copied somehow. This could somehow be the extension's fault if it tells the system to copy the ----s, but I can't figure out the code path where that happens. I'll also try using the primary clipboard. I usually keep that option off, but I'll turn it on for the next few days to see if I can get weirdness on my end. |
Describe the bug
There seems to be a difference how snippets are selected.
I noticed weird changes when pruning my history. When deleting an item, the list seemed to update weirdly. The entries didn't just move up. Sometimes an old already removed entry showed up near the top again. It almost felt like the list was being shuffled.
Note: I have been hacking about for #100, so I wasn't alarmed. But now I have the newest version installed by gnome, re-populated history and restarted gnome session.
How To Reproduce
Versions
Steps to reproduce
double click on each word in order from top to bottom.
open extension's menu and look at list, looks fine.
put mouse over topmost entry's delete button.
click away all seven entries
repeat steps 3 to 6 (or not, up to you)
select some unrelated text to get some new entries unrelated to our test
this time don't double click, instead select by dragging mouse, each word in order.
open extension's menu and look at list, also looks fine.
repeat steps 5 and 6
repeat steps 10 and 11
it will look fine if you always draged from left to right. Otherwise you'll only have the entries where you did from ltr or the last one if you did all from rtl.
Another test would be to select using keyboard, I didn't get around to doing that.
Additional context (if a crash, provide stack trace)
no crash
The text was updated successfully, but these errors were encountered: