Is there a property to cause Find to wrap around

SyntaxEditor for Windows Forms Forum

Posted 7 years ago by Mike Dempsey - Sr. Developer, Teradata Corp
Version: 12.1.0300
Avatar

If I am searching for text in a 'down' direction and the text only exists prior to the current location SyntaxEditor says that the string is not found. But if I simply repeat the Find it then finds first occurrance of the string in the file.

This only occurs if I have previously searched/found the string.
The first time I use Find it wraps as expected and only reports Not Found if the string does not exist anywhere in the file.

This is inconsistant.

Is there an option to tell the editor to wrap around and continue searching until it gets back to the original location before it says that the string does not exist - in all cases.

I have developed some logic that seems to handle all cases by issuing a second Find if the found count is zero and it did not pass the end of file ... but it is rather convoluted, so a 'Wrap' option would be much better.

Thanks
Mike

Comments (4)

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Mike,

Sorry but I'm not seeing this happen.  Please open our SDI Editor sample in the latest version and let us know exactly how it can be reproduced with the find dialog there, such as searching for "using".  Thanks.


Actipro Software Support

Posted 7 years ago by Mike Dempsey - Sr. Developer, Teradata Corp
Avatar

OK it seems that the problem is a little different that I had thought.

It isn't stoping at the end of the file it is stopping when it reaches the original starting point of the first search.

I wanted it to work like Visual Studio and other editors I have used. They report that it has passed the end of file (or the original starting point of the search) but they do not stop. They continue on to find the next occurance.
(even though that occurance has been reported earlier)

Answer - Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Mike,

When you move the caret somewhere else, we restart the search start offset, and that takes effect for the next round of searching.  Note the search start offset doesn't get reset if you are doing a find or replace operation though.  This is how we designed it to work.


Actipro Software Support

Posted 7 years ago by Mike Dempsey - Sr. Developer, Teradata Corp
Avatar

OK, thanks.
I can just check for PastSearchStartOffset and repeat the Find if it is set.

That seems to work fine. It then works just like Visual studio.

The latest build of this product (v2018.1 build 0341) was released 9 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.