MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Duplicate

Method Duplicate

Source/Engine/UI/GUI/Common/TextBoxBase.cs:699–712  ·  view source on GitHub ↗

Duplicates the current selection in the text box.

()

Source from the content-addressed store, hash-verified

697 /// Duplicates the current selection in the text box.
698 /// </summary>
699 public virtual void Duplicate()
700 {
701 if (IsReadOnly)
702 return;
703
704 var selectedText = SelectedText;
705 if (selectedText.Length > 0)
706 {
707 var right = SelectionRight;
708 SetSelection(right);
709 Insert(selectedText);
710 SetSelection(right, right + selectedText.Length);
711 }
712 }
713
714 /// <summary>
715 /// Ensures that the caret is visible in the TextBox window, by scrolling the TextBox control surface if necessary.

Callers

nothing calls this directly

Calls 1

InsertFunction · 0.85

Tested by

no test coverage detected