YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
22 stars 8 forks source link

Code Editor 2: "Auto-indent clipboard content" inserts tabs where they don't belong #6708

Open DragoniteSpam opened 2 months ago

DragoniteSpam commented 2 months ago

Description

I'm not sure if this is the same bug as #5356 or not, which looks like it has to do with curly brace behavior

When you paste code into an area with the same indentation level as the place where it came from, extra tabs get added

ce2 auto indent

This doesn't happen if the Auto Indent setting is turned off

Expected Change

No response

Steps To Reproduce

  1. Start GameMaker
  2. See the issue

How reliably can you recreate this issue using your steps above?

Always

Which version of GameMaker are you reporting this issue for?

2024.600 (Betas)

Which operating system(s) are you seeing the problem on?

Windows 10

Are you running GameMaker from inside your Steam library?

No

Contact Us Package Attached?

Sample Project Added?

DragoniteSpam commented 2 months ago

Tabs also behave badly if you paste single strings mid-line. This is probably the same bug but it might not be.

ce2 auto indent in line

Once again, it doesn't do this if the Auto Indent setting is turned off.

edit: I misspelled "snowman" didn't I

zreedy commented 3 weeks ago

Fixed. See https://github.com/YoYoGames/GameMaker-Bugs/issues/6243 for details

caitlinrmcintyre commented 3 days ago

Reopening as I'm still seeing a similar issue in IDE v2024.1100.0.624 Runtime v2024.1100.0.650, thanks.

caitlinrmcintyre commented 10 hours ago

Following the same steps as reported, this was the result I got. Screenshot 2024-09-26 155050

Here's the code to repro:

static GetRelevantSprite = function(direction) {
    // prioritize the up/down directions
    if (direction < 45 || direction > 315) return self.sprite_right; 
    if (direction <= 135) return self.sprite_up;
    if (direction < 225) return self.sprite_up;
    return self.sprite_down;
};