You are here: PSPad forum > English discussion forum > Re: Search results coherence when adding or removing lines

Re: Search results coherence when adding or removing lines

#1 Search results coherence when adding or removing lines

Posted by: Shores | Date: 2017-11-24 10:23 | IP: IP Logged

I know this is clearly a change in behaviour for the search results list, but I think it would be much more useful that way...

Usually, I use the search function to find all the places in a file when a specific code exists, and then I'll go through them to revise them one by one.

If my revision requires me to add or remove lines, then after two or three instances the search results become meaningless, since the inserted / removed lines have moved around the lines in which the search term has been found.

I was thinking it would be very nice if the item in the search results list would follow that line even if it moved around; it would just require to check on line insertion or removal, and correct the line reference in results that follow the point in which the change has been made, to point to the correct line.

1 A
2 b
3 c
4 d
5 e

I've searched for d, found in line 4.
Then I delete line 2, so the "d" result now should point to line 3:

1 A
2 c
3 d
4 e

Anybody else would find this useful?

smiling smiley

Edited 1 time(s). Last edit at 2017-11-24 10:30 by Shores.

Options: Reply | Quote | Up ^


#2 Re: Search results coherence when adding or removing lines

Posted by: pspad | Date: 2017-11-24 10:57 | IP: IP Logged

First: search result is simple result with link to line number
Second: search in files result is result from non open files which can be changed on background

You are right, it's possible to floow line number changes in file, but it isn't easy - not insert/delete changes only, but UNDO/REDO e.t.c.

What about extend seach functionality of putting bookmarks into find result lines?
You can edit and simple go through bookmarks with Alt+UP/Down

Options: Reply | Quote | Up ^


#3 Re: Search results coherence when adding or removing lines

Posted by: Shores | Date: 2017-11-26 16:33 | IP: IP Logged

That would be nice!

Options: Reply | Quote | Up ^


#4 Re: Search results coherence when adding or removing lines

Posted by: pspad | Date: 2017-11-26 16:50 | IP: IP Logged

It shouldn't be so hard. I will implement it into next build

Options: Reply | Quote | Up ^


#5 Re: Search results coherence when adding or removing lines

Posted by: AndreasW | Date: 2017-12-01 08:54 | IP: IP Logged

This would be a really cool feature. Looking forward to it!

Options: Reply | Quote | Up ^


#6 Re: Search results coherence when adding or removing lines

Posted by: Gabriel_ACE | Date: 2017-12-01 13:05 | IP: IP Logged

I AGREE TOO!!!

Options: Reply | Quote | Up ^


#7 Re: Search results coherence when adding or removing lines

Posted by: pspad | Date: 2018-02-17 18:02 | IP: IP Logged

Possibility to place bookmarks to all search occurences is ready for next build

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR