Author Topic: [line truncated] in search results  (Read 3324 times)

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
[line truncated] in search results
« on: February 15, 2019, 10:08:14 PM »
Doing BigFind with "List all occurrences", each line in search output is truncated and says "[line truncated]"

Is there a way to control how much text is printed before the truncation?

Using 23.0.1 Linux x64, CentOs 7.2

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: [line truncated] in search results
« Reply #1 on: February 15, 2019, 10:56:05 PM »
Found it:

Tools->Options->Editing->Search->Truncated search result width

Is this a relatively new feature? Wonder why I didn't notice this before?

mklein

  • Community Member
  • Posts: 90
  • Hero Points: 2
Re: [line truncated] in search results
« Reply #2 on: February 20, 2019, 09:02:00 PM »
I think there might have been a bug introduced in 23.0.1.0, as I'm now seeing this also when I never saw it before. I tried increasing the setting to 100 (the max) but I'm still seeing truncation and I don't think I should be (or maybe I don't understand the feature).

I agree I would like to be able to turn this off.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: [line truncated] in search results
« Reply #3 on: February 20, 2019, 09:03:29 PM »
I found another thread in this forum that said you can set it to 0 to turn it off and this works for me.

mklein

  • Community Member
  • Posts: 90
  • Hero Points: 2
Re: [line truncated] in search results
« Reply #4 on: February 20, 2019, 09:05:53 PM »
OK yeah I set to 0 and it's working again, though I'm positive there was a bug introduced here, as the previous setting was 500, and I was seeing truncation for much shorter lines.

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
Re: [line truncated] in search results
« Reply #5 on: February 20, 2019, 09:10:45 PM »
Seems to be broken for background find-in-file.
When I increase the limit and redo the FIF, I still get truncated results.
When I do FIF with Foreground search, truncation works as expected.

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1299
  • Hero Points: 130
Re: [line truncated] in search results
« Reply #6 on: February 20, 2019, 09:34:35 PM »
There were changes in 23.0.1 to address inconsistencies with two settings, Truncated search result width and Maximum search result line length.   If Truncated search result width is non-zero then it can truncate the leading or trailing part of line if the length before/after exceeds the width.  Setting it to 0 disables that. 

If truncate width is disabled, and Maximum search result line length is non-zero, then it may truncate the trailing part of the search result line.  Setting this to zero disables it.  If both truncate width AND maximum line length are disabled, then the entire line is returned.

Prior to v23.0.1, those two settings didn't behave well together and had implementations for foreground and background searches with inconsistent results.  To simplify in v23.0.1, it does one or the other, but not both. Docs don't make that clear, I will clarify that in future release.  If you think v23.0.1 is still not handling truncate or maximum length correctly, please post an example and I will investigate, could still be something wrong with the new implementation.

mklein

  • Community Member
  • Posts: 90
  • Hero Points: 2
Re: [line truncated] in search results
« Reply #7 on: February 20, 2019, 09:49:50 PM »
Something is unfortunately definitely broken. If I set both settings to 0, I'm still seeing truncation, and before changing anything, I was seeing truncation when I never saw it before and based on the settings I don't know why I would. I will try to find time to come up with a self contained example but I'm not sure when I will have time. If you could take a look again at the feature it would be appreciated.

mklein

  • Community Member
  • Posts: 90
  • Hero Points: 2
Re: [line truncated] in search results
« Reply #8 on: February 20, 2019, 09:51:25 PM »
And I concur with @jporkkahtc that when I do a foreground search it works as I would expect, but background is broken. Hopefully that is enough info to track it down?

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1299
  • Hero Points: 130
Re: [line truncated] in search results
« Reply #9 on: February 21, 2019, 04:51:36 PM »
Thanks for the report.  I have confirmed there is definitely something wrong with the def-vars not being picked up in the background search.  Investigating the issue now, will report when I have a resolution.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: [line truncated] in search results
« Reply #10 on: February 21, 2019, 04:58:56 PM »
If I wanted to use a macro to change "Maximum search result line length" and "Truncated search result width", how would I do it?

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1299
  • Hero Points: 130
Re: [line truncated] in search results
« Reply #11 on: February 21, 2019, 05:12:54 PM »
Both are macro def-vars, so you can set them directly:
def_search_result_max_line_size
def_search_result_truncate_cols