Author Topic: Autoformat off  (Read 4601 times)

0 Members and 1 Guest are viewing this topic.

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Autoformat off
« on: November 08, 2021, 09:03:22 am »
  [ You are not allowed to view this attachment ]  

I know that if we end a line with an underscore, it messes the autoformat up, but here it's tossing extra spaces into the mix to move SUB to be in line with the normal code, which is rather odd.  Normally it just completely skips formatting on both the continued lines, but here the autospace is kicking the SUB one indent right, even though we never tend to indent SUB...

Oddest thing is this happens in the first instance of QB64 which I've got up and running, but not in the second, and I really don't think there's anything in the source which changes formatting based on which temp or temp2 or temp12 file we're using...

Anyone else get something odd like this to happen for them, or am I just shortbus special again?  :P
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

FellippeHeitor

  • Guest
Re: Autoformat off
« Reply #1 on: November 08, 2021, 10:16:49 am »
I couldn't reproduce it solely based on your description (the "Untitled(2)" at the top also tells me it's the second instance of the IDE, which goes against what you're describing).

  [ You are not allowed to view this attachment ]  

Please let me know if anything new comes up.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Autoformat off
« Reply #2 on: November 08, 2021, 10:19:17 am »
I couldn't replicate in v2.0
  [ You are not allowed to view this attachment ]  

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Autoformat off
« Reply #3 on: November 08, 2021, 10:25:55 am »
I couldn't reproduce it solely based on your description (the "Untitled(2)" at the top also tells me it's the second instance of the IDE, which goes against what you're describing).

  [ You are not allowed to view this attachment ]  

Please let me know if anything new comes up.

Sorry.  It was the 2nd instance acting goofy, rather than the 1st, and I still have no clue why.  Closing the IDE and purging the temp files fixed the issue though, whatever it was.
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Autoformat off
« Reply #4 on: November 08, 2021, 10:28:58 am »
Aha! try spacing out the Sub line after the line extension _ is used THEN it doesn't fix automatically

I can replicate this:
  [ You are not allowed to view this attachment ]  

PS It reloads off too after save.

FellippeHeitor

  • Guest
Re: Autoformat off
« Reply #5 on: November 08, 2021, 10:30:05 am »
Aha! try spacing out the Sub line after the line extension _ is used THEN it doesn't fix automatically

I can replicate this:
  [ You are not allowed to view this attachment ]
As expected.

FellippeHeitor

  • Guest
Re: Autoformat off
« Reply #6 on: November 08, 2021, 10:30:46 am »
Sorry.  It was the 2nd instance acting goofy, rather than the 1st, and I still have no clue why.  Closing the IDE and purging the temp files fixed the issue though, whatever it was.

If it ever pops up again, let us know.

Offline Cobalt

  • QB64 Developer
  • Forum Resident
  • Posts: 878
  • At 60 I become highly radioactive!
    • View Profile
Re: Autoformat off
« Reply #7 on: November 08, 2021, 12:29:40 pm »
I couldn't reproduce it solely based on your description (the "Untitled(2)" at the top also tells me it's the second instance of the IDE, which goes against what you're describing).

What difference would it make on how many instances of the IDE you had up?
Granted after becoming radioactive I only have a half-life!

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Autoformat off
« Reply #8 on: November 08, 2021, 01:46:34 pm »
What difference would it make on how many instances of the IDE you had up?

No idea, but one instance was buggy and the other wasn't.  Looking back, it may have been something to do with the code I wrote that swaps SCREENs rapidly and shared the other day.  It definitely seemed to corrupt memory in various ways and I'm not one to reboot anywhere near as often as I should when stuff like that happens.  Something somewhere got twitchy off though, and wasn't performing like I would've ever expected with regards to all the time I've spent tinkering around inside the source before in the past.

Good news is the issue is gone for now and I can't replicate it. 
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Autoformat off
« Reply #9 on: November 15, 2021, 02:59:28 am »
Unrelated to the above, but here's an issue where autoformat is indeed off:

Code: QB64: [Select]
  1. Sub DrawGrid
  2.     For x = 0 To 640: For y = 0 To 440
  3.         kolor = 0
  4.         If Grid(x, y) And 1 Then kolor = 15
  5.             If Grid(x, y) And 2 Then kolor = 40
  6.             PSet (x + 20, y + 20), 40
  7.     Next y, x
  8.     Color 40: _PrintString (GridX + 16, GrabY + 16), "X"

Even the code box here has the formatting off to showcase how it'd look with the above...

Those deeper indented IFs should be at the same format spacing as the first IF is, but QB64 is somehow convinced they need additional indenting.

When nesting FOR statements like the above, the index for IF statements gets screwy.
« Last Edit: November 15, 2021, 03:24:58 am by SMcNeill »
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!