What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 127 Stack Exchange communities.

I've been seeing many questions and answers with the first line of a method or class indented by a negative amount. I haven't been able to reproduce it. Maybe someone on the team can look at http://stackoverflow.com/questions/2352987/multi-threading-calls-in-windows-forms-application and get some idea of what's different about that text?

In particular, trying to edit it to align it properly causes some really screwy results.

BTW, I'm using FireFox 3.5.8.

share|improve this question
add comment

2 Answers

That example seems to be using quasi-random numbers of blanks at the start of the line, leading to quasi-random indentation of the code. You can sometimes get odd effects if someone has managed to mix tabs and blanks, but that does not appear to be the problem with the example question.

Basically, people don't care enough about the layout of the code they're showing off. They'll have to hope it doesn't come back to bite them when they're applying for jobs.

share|improve this answer
1  
The OP replied something about it being a problem with pasting from Visual Studio. Yet the text in the answer didn't look strange. No tabs, for instance. –  John Saunders Feb 28 '10 at 23:52
add comment

I've seem similar issues in the past and assumed that it worked like this

  • Poster know that four space indent makes code
  • Poster types four space
  • Goes to IDE copies code
  • Pastes code, which doesn't do whay is expected
  • remembers (or reads the instructions) that the 01010101010101010101010101 button is what is wanted
  • selects code (including the indented first line
  • hits 010101010101010101010101011001
  • doesn't fix the first line.
share|improve this answer
1  
That's the 0101010101010101010101010101010101010101010101010101 button. –  Rosinante Mar 1 '10 at 2:01
    
@Rosinante: I'd upvote your comment, but it'd have a non-binary number. –  Andrew Grimm Aug 23 '10 at 4:13
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .