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

Code Editor — when dragging the mini-map it also selects code. #94077

Closed
donn-xx opened this issue Jul 8, 2024 · 6 comments · Fixed by #95008
Closed

Code Editor — when dragging the mini-map it also selects code. #94077

donn-xx opened this issue Jul 8, 2024 · 6 comments · Fixed by #95008

Comments

@donn-xx
Copy link

donn-xx commented Jul 8, 2024

Tested versions

v4.3.beta.custom_build [6a13fdc]

System information

Godot v4.3.beta (6a13fdc) - Ubuntu 22.04.4 LTS 22.04 - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2060 (nvidia; 535.183.01) - Intel(R) Core(TM) i5-9400F CPU @ 2.90GHz (6 Threads)

Issue description

When you use the mini-map in the code editor, dragging it up/down will often start selecting the code instead.

image

Steps to reproduce

Fiddle about in the code editor.

Minimal reproduction project (MRP)

NA

@kitbdev
Copy link
Contributor

kitbdev commented Jul 9, 2024

I can't reproduce (26d1577 Windows 10.0.22631)
Do you have a consistent setup?
Some other information that would be useful for reproduction:

  • Is word wrap enabled?
  • Are any lines folded?
  • Is scroll_past_end_of_file enabled?
  • Does the minimap take up the full height and need to scroll?
  • Where are you clicking inside of the minimap?
  • Were you selecting text before dragging the minimap?
  • Does it happen anywhere in the script (top and bottom)?
  • Did you use right-click? (If so, then it should be fixed by Fix TextEdit mouse selection and scroll cancel #91778)

@vabrador
Copy link

vabrador commented Jul 9, 2024

I can reproduce this behavior on:

Windows 11 - 4.2.2.stable.official [15073af] - GL Compatibility - GeForce RTX 3070 Ti

if I shrink the editor window width to be as small as it is allowed to get. Additionally, only the portion near the bottom of the minimap appears to have this issue for my test script, ~300 lines of commented-out code.
GIF:
2024-07-09 1 Script Editor Minimap Issue

For my reproduction:

  • word wrap: disable
  • lines folded: none
  • scroll past end of file: enabled
  • lower third of the minimap
  • text selection prior to minimap click appears to have no impact on reproducibility
  • left click only

@kitbdev
Copy link
Contributor

kitbdev commented Jul 9, 2024

@vabrador

Can you reproduce in the latest beta?

@vabrador
Copy link

@kitbdev Ah yep, looks like I was actually experiencing #63842 earlier.

Re-tested on 4.3 beta2:
Windows 11 - v4.3.beta2.official [b75f048] - GL Compatibility - GeForce RTX 3070 Ti

  • Could not reproduce

Re-tested on the issue author's build:
Windows 11 - v4.3.beta.custom_build [6a13fdc] - GL Compatibility - GeForce RTX 3070 Ti

  • Could not reproduce
  • Also could not reproduce with Forward+ renderer, word wrap, or line folding

@vabrador
Copy link

vabrador commented Jul 10, 2024

Might be specific to Linux or Ubuntu. I can reproduce the issue in a Ubuntu VM on 4.3 beta2.

Re-tested on Ubuntu 22.04 via VirtualBox:
Ubuntu 22.04 LTS (VM on Windows 11) - v4.3.beta2.official [b75f048] - GL Compatibility

2024-07-09 2 Ubuntu Script Editor Minimap Issue

  • Due to testing on a VM it's a little hard to tell if some selection issues happen when clicking and moving the mouse faster than my VM can really keep up with.
  • Happens more often when clicking the mouse rapidly.
  • Difficult to find any specific sequence of actions that reliably causes the behavior.
  • Starting with focus somewhere in the text, then quickly clicking & double-clicking on the minimap, produces the error most of the time, but not all of the time.

@donn-xx
Copy link
Author

donn-xx commented Jul 10, 2024

I can't reproduce .. Do you have a consistent setup? Some other information that would be useful for reproduction:

I pull from Godot 4.3 dev main now and then and compile. Nothing fancy.

* Is word wrap enabled?

I tried it both ways. Same result.

* Are any lines folded?

Also tried this both ways. Same result.

* Is scroll_past_end_of_file enabled?

I enabled it now and it's a bit harder to get the bug, but it's still happening.

* Does the minimap take up the full height and need to scroll?

Yes.

* Where are you clicking inside of the minimap?

I have tried various places in the green block (that denotes the page) and the bug varies. I notice that if I click and drag very quickly it happens. If I click, paaaauuuussseee, then drag things work as expected.

* Were you selecting text before dragging the minimap?

Yes and No. Both cause the bug.

* Does it happen anywhere in the script (top and bottom)?

Yes.

* Did you use right-click? (If so, then it should be fixed by [Fix TextEdit mouse selection and scroll cancel #91778](https://github.com/godotengine/godot/pull/91778))

I get a popup menu when I use right click, even on the map. Not sure what you mean.

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

Successfully merging a pull request may close this issue.

5 participants