MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / ReplaceSelected

Method ReplaceSelected

editor/ScriptEditorDlg.cpp:316–330  ·  view source on GitHub ↗

Replaces the selected word with the passed word

Source from the content-addressed store, hash-verified

314
315// Replaces the selected word with the passed word
316void CScriptEditorDlg::ReplaceSelected(char *replace_word) {
317 UpdateData(false);
318
319 CEdit *edit;
320 int start_index, end_index;
321
322 edit = (CEdit *)GetDlgItem(IDC_SCRIPTVIEW);
323 edit->SetFocus();
324 edit->GetSel(start_index, end_index);
325 edit->ReplaceSel(replace_word);
326
327 UpdateData();
328
329 SetCurrentIndex(start_index);
330}
331
332// This will start from the beginning and replace all the occurences
333void CScriptEditorDlg::ReplaceAll(char *find_word, char *replace_word) {

Callers

nothing calls this directly

Calls 1

SetCurrentIndexFunction · 0.85

Tested by

no test coverage detected