cannot get rid of underline characters at start of line

Discuss any topics about the editor here

cannot get rid of underline characters at start of line

Postby reksa » Thu May 02, 2013 10:12 pm

Hi Cody,

I get strange underline characters at the start of the line and I cannot remove them.
See attachment.

I don't know how it happens, but when I put a blank line between two lines they disappear.
Also when I turn off syntax highlighting they go away.

I'm using the Python syntax highlighter, and using my own python variant .mpy file
I get the same problem with 7.20 and 7.12.

Any idea how what they are and how to remove them?

cheers

-mike
Attachments
editra_underline.gif
editra_underline.gif (4.47 KiB) Viewed 2717 times
reksa
User
 
Posts: 16
Joined: Mon Apr 25, 2011 12:48 am

Re: cannot get rid of underline characters at start of line

Postby cody » Fri May 03, 2013 3:11 pm

This is a special feature of the Python highlighter. It is indicating that you have inconsistent use of indentation.

You should have either all Spaces or all Tabs (spaces being the general standard). The underline is telling you that those lines either have mixed indentation or are using different indentation than the rest of the file.

So to make them go away you just need to fix you indentation.
User avatar
cody
Site Admin
 
Posts: 1315
Joined: Mon Oct 09, 2006 2:49 am
Location: United States

Re: cannot get rid of underline characters at start of line

Postby reksa » Sun May 05, 2013 3:30 pm

Thanks, I understand. Its obvious, when you enable 'Show Whitespaces'

What is confusing is that I normally have 'Use Tabs instead of spaces' unchecked.
So when writing directly into the editor there is no way that a Tab can be entered
so all python indentation is done with spaces, even if tabs are entered. (this
is a good default setting IMO)

However when I entered the code by pasting it from the clipboard (PC Windows) then
the tabs characters were not translated into spaces and I get those spacing error marks.
Which were very difficult to to remove.

I guess my only request is that when pasting, is it possible to change tabs to spaces?
(ie honor the 'Use Tabs Instead of Spaces' option) not sure that would be easy from
what I have seen using the wxpython shell widget.

-mike
reksa
User
 
Posts: 16
Joined: Mon Apr 25, 2011 12:48 am

Re: cannot get rid of underline characters at start of line

Postby cody » Mon May 06, 2013 2:36 am

Yea it should probably do the conversion on Paste.

Due to the limited amount of time I have had to work recently it would be best to create a ticket on the issue tracker so that I don't forget to look into it at my next chance ;).
User avatar
cody
Site Admin
 
Posts: 1315
Joined: Mon Oct 09, 2006 2:49 am
Location: United States


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron