Python Scripts Copy Paste makes some error

I’m teaching students about Automating Architectural Design in Rhino + python.
I wrote some well made codes with methods and break it into long code just to show them.

But the problem window in component told me that there are indent error in my code which I couldn’t find any problem.
So I turn off the GH + Rhino totally and turn it on again.
When I open the script component again I found codes are deleted or repeated so badly, and I find what the indent error was.

The things that I saw and the codes Rhino read were different. And It had been matched when I turn it off and on. Because I was busy, I fix code and I didn’t leave any screen shots.

I just wanted to report. If any body has same problem, just turn Rhino off and on again

I experience this again. It happens when I push alt shift arrow key to move line.

This is page I turn this off and on.

Did you mean to have room_dats in the list comp? The suspiciously similar, but different, variable room_datas is printed on the previous line.

There are a lot of unicode characters in there. If you’re copying from non-UTF-8 encoded files, have you set the encoding for the file at the top: 2. Lexical analysis — Python 3.12.2 documentation ?

Otherwise, is a non-ascii whitespace character getting pasted in from whereever the code was copied from, that’s causing trouble before it gets to Python?

If your code still runs just fine, an option to turn off pyflakes (and any other added extras) would be good though!