#150 "Persistent" search strings.

Program (79)

This patch is a rework of one I submitted just prior to
the 5.4 release of NEdit. I have broken out the
"File->Save All" part of the original submission into a
separate patch.

This patch saves and restores the search and replace
strings from the last NEdit session. It uses the new
resource file scheme from util.c to determine the
location of the file to store the strings in.

The patch is against the CVS version of NEdit from the
16th October 2006.


  • Bert Wesarg

    Bert Wesarg - 2008-10-24

    Thanks for the patch I think that this is really worth to take into the code base.

    But, I have two complaints:

    a) You write in the wrong order the history into the file. The search history is a circular buffer with HistStart as the start. So you should use the historyIndex() function to index in the right order.

    b) I would prefer the 'online'-up-to-date scheme we use for the file-open-history. I.e. keep memory and file db in sync. That would mean you share your history between current running session but you won't overwrite the history of other sessions. The logic is obviously complexer than the file-open-db.


Log in to post a comment.