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

Method ReplaceSelected

editor/ScriptStudio.cpp:532–544  ·  view source on GitHub ↗

Replaces the selected word with the passed word

Source from the content-addressed store, hash-verified

530
531// Replaces the selected word with the passed word
532void CScriptStudio::ReplaceSelected(char *replace_word) {
533 long start_index, end_index;
534
535 UpdateData(false);
536
537 m_RichEdit.SetFocus();
538 m_RichEdit.GetSel(start_index, end_index);
539 m_RichEdit.ReplaceSel(replace_word);
540
541 UpdateData();
542
543 SetCurrentIndex(start_index);
544}
545
546// This will start from the beginning and replace all the occurences
547void CScriptStudio::ReplaceAll(char *find_word, char *replace_word) {

Callers

nothing calls this directly

Calls 1

SetCurrentIndexFunction · 0.85

Tested by

no test coverage detected