/* highlight */ FIND_FLAGS = eeFindNext | eeFindReplaceCase //| eeFindReplaceOnlyWord | eeFindAround | eeFindReplaceQuiet; word = document.selection.Text; if (word != "") { Window.Redraw = false; with (document.selection) { tx = GetTopPointX(eePosLogical); ty = GetTopPointY(eePosLogical); bx = GetBottomPointX(eePosLogical); by = GetBottomPointY(eePosLogical); Find(word, FIND_FLAGS); } Window.Redraw = true; with (document.selection) { SetActivePoint(eePosLogical, tx, ty, false); SetActivePoint(eePosLogical, bx, by, true); } } else { document.HighlightFind = false; }