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

Alt-N, goto-next-clone, does not select proper body text #61

Closed
edreamleo opened this issue Dec 11, 2023 · 12 comments
Closed

Alt-N, goto-next-clone, does not select proper body text #61

edreamleo opened this issue Dec 11, 2023 · 12 comments
Assignees
Labels
bug Something isn't working Urgent

Comments

@edreamleo
Copy link
Collaborator

edreamleo commented Dec 11, 2023

This is a serious bug that might lead to corrupted data.

Using LeoJS in vscode.dev:

  • Open Leo's github repo: https://github.com/leo-editor/leo-editor
  • Open LeoPyRef.leo in LeoJS.
  • Clone a node containing text. I cloned class NestedSplitterTopLevel (QWidget)
  • Move the clone so it is the last top-level node.
  • Alt-N selects the original (now cloned) node but does not select the proper body text!

It appears that the body text is the text of the node's parent.

@edreamleo edreamleo added the bug Something isn't working label Dec 11, 2023
@boltex
Copy link
Owner

boltex commented Dec 12, 2023

@edreamleo Hmm, I cannot reproduce this bug. I did it with LeoPyRef exactly like you suggested... weird.

Perhaps you could grab screenshot, or setup a zoom session if you can reproduce the bug reliably?

@edreamleo
Copy link
Collaborator Author

edreamleo commented Dec 12, 2023 via email

@edreamleo
Copy link
Collaborator Author

edreamleo commented Dec 12, 2023 via email

@boltex
Copy link
Owner

boltex commented Dec 16, 2023

@edreamleo Thanks for showing me a reproduction of the bud. I've just noticed also that Leo actually allows you to do this command on a non-clone node, in which case it just does a 'find next clone'.

I'll start by fixing this behavior to match Leo and go on from this to make more experiments to try to squash this bug.

@edreamleo
Copy link
Collaborator Author

edreamleo commented Dec 16, 2023 via email

@boltex
Copy link
Owner

boltex commented Dec 16, 2023

@edreamleo the devel branch now has a possible fix. Can you try it out on your machine ? (I'll send you a pre-packaged extension file if you prefer)

@boltex
Copy link
Owner

boltex commented Dec 16, 2023

@edreamleo I just found a way to reproduce it reliably on my machine: the other (target) clone to be navigated-to has to be hidden in a collapsed part of the tree.

The goto-next-marked command has the same problem. I'm near finding the exact source of the problem for those command refresh-ui resolution bugs.

@edreamleo
Copy link
Collaborator Author

@boltex I've pulled devel. How do I test the code?

@boltex
Copy link
Owner

boltex commented Dec 16, 2023

Just by launching the debugger with F5. But no need to do so now because I've found a way to reproduce! So dont bother since I can now test reliably by myself. (I proposed that you tried it out because i could not reproduce the bug earlier.. hehe.)

@edreamleo
Copy link
Collaborator Author

@boltex Alright. I'll leave you to it. Good luck!

@boltex
Copy link
Owner

boltex commented Dec 17, 2023

Fixed in #70
Now live as version 0.2.4 🥳

@boltex boltex closed this as completed Dec 17, 2023
@edreamleo
Copy link
Collaborator Author

@boltex The fix works for me on both vs-code and vscode.dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Urgent
Projects
None yet
Development

No branches or pull requests

2 participants