-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Script editor undo sometimes merges unrelated actions #77101
Comments
Normally it is only about time between two inputs. So maybe you are super fast at changing lines? Another idea would be to force stop merge on certain action, for example changing line. I'm not sure undoredo permits that for the moment so we would need to add the evolution to it first. But I think this would be the best solution (if this is really about Kobewi being way too fast at typing) |
Suffering from success 🥲 There's another case of this bug, which is 10000% more annoying: godot_oX5CguFOJO.mp4When I redo the text, the editor instead of staying at the change teleports me to the last caret position. It's extremely confusing and gives a false impression that you made some change in unrelated line. In the video above, my change is adding |
Something about the way the code editor works already does this and the grouping time for the same action is way too lenient for me. I waste a ton of time fighting with this feature and would love to see customizable times. The delay between control + backspaces being grouped in the video below is egregiously long. At the very least changing line should break the grouping, not necessarily be its own action. Godot_v4.1-stable_win64_2023-08-12_07-28-27.mp4Edit to add more context on how often this happens to me with the style of coding I do. Here I'm just trying to change two lines to go back on a decision I made, but I make a typo I want to undo. Line 1 from Here's what it looks like in the script editor vs VSCode.godot_undo.mp4vscode_undo.mp4I fat finger |
Here's my take on this:
|
I managed to find the setting for how long it needs to stay idle before they make the next actions part of a new undo operation. It's in Project Settings->GUI -> Timers -> Text Edit Idle Detect (sec) (gui/timers/text_edit_idle_detect_sec). You'll need to enable "Advanced Settings" to see them. By default it's 3 seconds. Aside from that, I agree with what's been said. Moving the cursor, either by mouse or keyboard, should make the next action part of a new undo operation. |
Created a pull request to solve this issue. Now if you add text on three different lines in quick succession, you'll need three undo commands to clear them. The only exception is if you hold down backspace and delete multiple lines in one go. I was going to see about dividing that up into multiple operations, but then wasn't sure if that was necessary. In any event, every time you click to move the caret or move the caret via arrow keys, it'll split the undo operation. |
I see this issue again in 4.3 rc3 godot_aQSZTb9JbS.mp4It's not as common though and might be related to selection. EDIT: jpQ81oH6Qg.mp4Undo and redo are inconsistent. |
I need more detailed repo steps. I appreciate the video but it's hard to work out what's going on since I don't know what keys are being pressed. In the 2nd video I'm not certain which issue you're pointing to. |
I actually haven't encountered it recently. Maybe it's fixed again. |
Alright, well glad to hear it's low key at the very least. Let us know if it happens again. |
Godot version
4.1 5c653c2
System information
Windows 10 x64
Issue description
Example:
godot.windows.editor.dev.x86_64_mOiEC5hG9k.mp4
I started writing something, but made a mistake, so wanted to undo it. The undo registered this change and another change in a different line as the same action. So I either have to manually remove the wrong text (the one below) or write the correct text (the one above) again 😒
It happens quite frequently. I move the caret to another line and write something, but then it suddenly gets merged with what I wrote previously. Annoying stuff.
Steps to reproduce
(I don't know what exactly triggers cases like above; at least it doesn't happen all the time)
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: