Search and replace text initial value

Tadas's profile image Tadas posted 6 years ago in General Permalink

Would be great that "Search and replace text" dialog would open with initial value equal to selection in current query tab.

ansgar's profile image ansgar posted 6 years ago Permalink

Heidi already does that, doesn't it? Just tested, look at the screeny.

1 attachment(s):
  • find-dialog-current-selection
Tadas's profile image Tadas posted 6 years ago Permalink

No, it doesn't. Maybe first time, yes. But I see that it uses some other phrases, maybe it come from last searches, maybe from clipboard, I don't know. Look at the screenshot.

1 attachment(s):
  • h1
ansgar's profile image ansgar posted 6 years ago Permalink

Hm, the relevant code looks like this:

if _Editor.SelAvail then
  SearchText := _Editor.SelText
else
  SearchText := _Editor.WordAtCursor;

You probably clicked into the grid with the one result cell before calling the find-dialog? In that case the dialog uses the underlying text in the cell.

[expired user #11521]'s profile image [expired user #11521] posted 6 years ago Permalink

Hi,

i am new to heidisql and have a search and replace question. I have a database with multible fields. I need to replace the following thing

img src="//mydomain/track.php?track=L2FjdGlvbi5tZXRhZmZpbGlhdGlvbi&id=93820fddd4b8bd8511f7ca9" style="width: 1px; height: 1px"

The encoded numbers always are different. The rest is always the same. Does anybody know how I can remove this from the database via heidisql?

kind regards

Michael

Tadas's profile image Tadas posted 6 years ago Permalink

Yes, maybe I clicked the cell in the grid. But then I changed cursor position, moved focus to the text editor area and made a new selection inside the text. But the program assumes that I'd prefer to search for the previous selection value. Not so obvious. Ok, I selected the cell in the grid. How can I undo this selection? If I click second time on cell, selection remains and error message "Grid editing error: Could not determine name of table" appears. I found that selection highlight can be undone by clicking in grid "out-of-margin" area. But still "Search and replace text" window remembers this grid-selection and offers as default value for search. The only way to reset this grid-selection is to execute query again and keep away from clicking in the grid area again. Maybe grid-selection is OK to propose as default value for search. But I think that text area selection should be proposed, if selection was created later in the text area.

Please login to leave a reply, or register at first.