I've ran into a slight issue in Delphi XE6:

I've ran into a slight issue in Delphi XE6:
- hints/warnings/errors/etc. in messages are always reported 2 lines upper than the actual issue, i.e. error is at line 500, the message shows the error to be at line 498

anyone know how this can be solved? it's really annoying (:

Comments

  1. I wrote myself a crlf fixer and this problem went away.

    ReplyDelete
  2. Jeroen Wiert Pluimers , Warren Postma thank you, I'll look into that and come back with a response, but I can see that being the issue(in my case) because I used Notepad++ to replace a lot of unit names within a project that I've upgraded, maybe Notepad++ screwed up the the line breaks or D2010 screwed up at some point...

    ReplyDelete
  3. Tools -> Options -> Editor Options -> uncheck Preserve line ends, that forces saving source code with proper Windows line endings. Best way to avoid crlf issues.

    ReplyDelete
  4. Dalija Prasnikar and still within the IDE every once in a while it gets it wrong.
    I'm not sure why yet.

    ReplyDelete
  5. Jeroen Wiert Pluimers Line endings are corrected only when file is saved, maybe IDE doesn't refresh properly.

    ReplyDelete
  6. it seems that the line breaks were the issue, and I know where I failed: in the replace, I've set \r in stead or \r\n

    Thank you all for your input, helped a lot!

    ReplyDelete
  7. Sometimes this can be related to the git line endings handling (core.autocrlf) and how others have set this settings (https://help.github.com/articles/dealing-with-line-endings)

    ReplyDelete
  8. Stefan Glienke we're using svn and the error was on my part when I've done the replace with "\r" in stead of "\r\n"

    ReplyDelete
  9. Just wanted to remind that ModelMaker Code Explorer has a rarely used but very useful feature to detect and correct irregular line ends. I use it from time to time when something breaks them...

    ReplyDelete
  10. Nice. There are many great little things in MMX Code Explorer.

    ReplyDelete

Post a Comment