Using /* for comments

This is my first line in a sketch:

/* Blink an LED a variable number of times (with constant on & off durations)

As the window I'm using is not wide enough to see all of that, I split the line by deleting the space between 'times' and '(with' and pressing Enter. But that gave me this result.

/* Blink an LED a variable number of times
 *  
 */(with constant on & off durations)

Why that extra line and why the asterisk?

I must have set something wrongly because earlier sketches I've written displayed as I'd expect, such as this one:

 /* Saturday 13 June 2020
 Test for 5s or 30s video using switch that sets D4 L or H
 Instead use LED on D8. Flash it once if D4 is L, twice if H
 */

Terry

Check the preferences in the Arduino IDE. (Shortcut - Ctrl + comma) and disable the two options-

Show line numbers
Enable Code folding

Tell me if that worked for you.

.. Arnav

It's just some goofy thing the Arduino IDE does to "pretty" up the comment. It's especially annoying because then when you do an auto format the asterisk border is removed, so there are conflicting styles. I reported it here:

Well, It's not that big of a deal.

ArnavPawarAA:
Check the preferences in the Arduino IDE. (Shortcut - Ctrl + comma) and disable the two options-

Show line numbers
Enable Code folding

Tell me if that worked for you.

Did you bother to try it yourself, or are you just taking wild guesses for the sake of boosting your post count?

I will say that it's not something Arduino can resolve directly. They are using an editor component (RSyntaxTextArea) for the Arduino IDE written by someone else, so the change needs to be made to that code. That said, it's open source, so anyone is free to make that change to RSyntaxTextArea. I suppose there are always much more important bugs and feature requests to work on.

ArnavPawarAA:
The line numbers and code folding can also be the problem.

There is zero chance about that, it’s not even relevant if you read the question:

Why that extra line and why the asterisk?

It’s not about showing line numbers or not, or lines missing in display... it is about adding those extra formatting stars to beautify the code (and which will disappear at the next ctrl -T...)

Asking someone to perform modifications without expressing that you you have no clue if that will work or not and is the first random idea you got might mislead generations of beginners finding out your post.

So If you don’t know, don’t post in such an Affirmative way (even your text above is affirmative that it can be the problem...). it’s OK to explore ideas, forum is about sharing, but make it clear Then it’s just half baked guesswork.