Author Topic: Replace in Files/Replace all is creating file tabs for same file  (Read 1234 times)

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Replace in Files/Replace all is creating file tabs for same file
« on: February 19, 2020, 03:18:33 PM »
If I do "Replace in Files" for <current buffer directory> and click "Replace All", if one file has multiple items that get replaced, I'm noticing that new tabs for that file are opened - I'll have file.cc:1, file.cc:2, etc.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: Replace in Files/Replace all is creating file tabs for same file
« Reply #1 on: February 19, 2020, 03:40:45 PM »
When a file is opened via a search tab, it just calls "edit()". In other words, there should be no difference in what happens when opening a file via a search tab or any other feature which opens a file. There are some advanced options which are not in the GUI that can effect this.  If you can reproduce this every time (I can't), try a default config.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Replace in Files/Replace all is creating file tabs for same file
« Reply #2 on: February 19, 2020, 03:45:53 PM »
I haven't tried reproing it, don't have time right now.

But some hints, my "Find" has "List all occurrences" and "List current context" checked. Perhaps try that? I do see all of the occurences that were replaced in the search tabs which is very helpful, perhaps that has something to do with it?

I also have "Match case" and "Match whole word" checked, but not sure they make a difference. I think I saw it before without those 2 checked.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Replace in Files/Replace all is creating file tabs for same file
« Reply #3 on: February 19, 2020, 03:48:23 PM »
Actually, it could be that when I double-click on the replaced occurrences in the search tab, that is when the multiple tabs are created? Don't have time to narrow it down now, but maybe that is what is happening?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: Replace in Files/Replace all is creating file tabs for same file
« Reply #4 on: February 19, 2020, 04:03:00 PM »
The grep_open_file commands seems to force a new tab to be opened (accessed via right click menu). I'm not seeing an option which does this though.