Author Topic: Drifting line numbers in Output Window -- how to reset?  (Read 2041 times)

machish

  • Community Member
  • Posts: 52
  • Hero Points: 0
Drifting line numbers in Output Window -- how to reset?
« on: October 09, 2013, 02:00:36 am »
Hello,
We have a command-line build system. I find that it's easy to run the build in a cmd window and then paste the output in to the Output Window (rather than configure SlickEdit to execute the build). Then I can double-click and jump directly to the source.
Code: [Select]
build
type build.err | clip
* - OR - *
grep -s -n MyFancyRegularExpression *.cpp | clip
-Paste in Output Window
-Bob is my uncle!

That works great for the first couple of times. But as I edit the file, the line numbers start to drift. I believe that this is actually due to SlickEdit trying to be helpful. If I do a build, add some lines to fix a compilation error near the top of the file, then it's smart enough to add an offset so that the errors in the middle of the file will match up to the intended place.
But my problem is that I'm not sure how to reset the line numbering compensation. The next time I paste something in to the Output Window, I'd like it to get reset.
Is there an easy way to reset the logic?

-martin

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3604
  • Hero Points: 480
Re: Drifting line numbers in Output Window -- how to reset?
« Reply #1 on: October 09, 2013, 12:30:06 pm »
From the Slickedit command line, invoke the command "reset_next_error".

Unless your command line build system requires tons of magic to run, it is very easy to configure your SlickEdit project to invoke it directly.  Project > Project Properties... > Tools > Build and enter the command line and build directory.  Even if you have to put together a few batch files to simplify things, this will save you a lot of time in the long run rather than cutting and pasting build output.

machish

  • Community Member
  • Posts: 52
  • Hero Points: 0
Re: Drifting line numbers in Output Window -- how to reset?
« Reply #2 on: October 10, 2013, 07:52:35 pm »
Thanks, reset_next_error worked like a charm!

My build environment is started from a batch file that takes about 30 seconds to launch a window. Then I can run `build` from within that window.
I don't see an easy way to configure launch (and keep) that build environment window. The 'Pre-Build' commands on the Build tab seem to not be stored in the Build Window environment.

Maybe there's some documentation that I'm missing? :)

-martin

machish

  • Community Member
  • Posts: 52
  • Hero Points: 0
Re: Drifting line numbers in Output Window -- how to reset?
« Reply #3 on: October 10, 2013, 10:50:48 pm »
Whoa, I never before noticed the 1410-page (!) PDF installed with the product. Perhaps I should Read The Fine Material first... :)

-martin