pkulchenko / ZeroBranePackage

Packages for ZeroBrane Studio (https://studio.zerobrane.com)
MIT License
246 stars 148 forks source link

replace in files #91

Closed qgenesist closed 3 years ago

qgenesist commented 3 years ago

I believe I am on the lastest version. W10 updates up to date.

I search for _cfn replace _CFN Aa button active. activate replace all button. finds 38 in 4 files. put my cursor in the results box and save. save all is greyed out. it saves 0. what are the actual steps and order to save these changes? It always comes as a surprise to me when it work, which it does sometimes. I must not understand the steps.

pkulchenko commented 3 years ago

I search for _cfn replace _CFN Aa button active. activate replace all button. finds 38 in 4 files.

So far so good.

put my cursor in the results box and save. save all is greyed out. it saves 0.

One, you shouldn't put the cursor in the search results tab, as it should already be there. Two, the name for the tab with search results should look like * Search Results: _cfn, with * indicating that there are some changes that need to be saved. Selecting Save or Ctrl-S should save those changes and add "Updated X lines in Y files" message to the end of the search window. If that doesn't happen, what text does it show after Searched for '_cfn' message when the search is done?

qgenesist commented 3 years ago

z my cursor is right behind the search for _cfn earched for '_cfn'. Found 72 instances on 72 lines in 6 files. this time (a fresh restart) save was not greyed out and it saved them rather than the did not save message: (dont remember it exactly) updated 0 of 0 or the like. I cannot reproduce the problem at will.

went out of zb and back in and now: 41 local _ext = FSO:GetExtensionName(_CFN) 42: return _CFP, _fil, _ext 43 end 44 error('directory does not exist')

Searched for '_cfp'. Found 42 instances on 42 lines in 9 files.

Review the changes and save this preview to apply them. You can also make other changes; only lines with : will be updated. Context lines (if any) are used as safety checks during the update. (save and save all are greyed out)

pkulchenko commented 3 years ago

I cannot reproduce the problem at will.

So, in this case everything works as expected, right?

Context lines (if any) are used as safety checks during the update. (save and save all are greyed out)

Is the cursor in the Search Results window? The only reason for Save to be greyed out if the Search Results window is not active. Can you click on it and see if Save becomes available?

qgenesist commented 3 years ago

searched for _cfp change to _CFP found 42 shows : lines saved now. but I have been placing my cursor in search results window I will update next time it happens (its usually when I have about 10 windows open and have made many changes over 3 or 4 plugins (fh plugins not zb plugins)


From: Paul Kulchenko @.> Sent: Thursday, August 12, 2021 12:56 PM To: pkulchenko/ZeroBranePackage @.> Cc: qgenesist @.>; Author @.> Subject: Re: [pkulchenko/ZeroBranePackage] replace in files (#91)

I cannot reproduce the problem at will.

So, in this case everything works as expected, right?

Context lines (if any) are used as safety checks during the update. (save and save all are greyed out)

Is the cursor in the Search Results window? The only reason for Save to be greyed out if the Search Results window is not active. Can you click on it and see if Save becomes available?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/pkulchenko/ZeroBranePackage/issues/91#issuecomment-897849365, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHUMWT7XN2AD7IP7ZCML4Z3T4QDNRANCNFSM5B6UO5UQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email.

pkulchenko commented 3 years ago

Thank you for the update. Just a quick comment: Save All doesn't take Search Result windows into account to avoid the risk of saving them by mistake. Each Search Result window needs to be saved individually (with it being an active window).

I'll consider revising the text at the bottom to make it clear (that the window needs to be active to save).

pkulchenko commented 3 years ago

Closing, as it's not an issue with any of the packages.