git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43510
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// so subtract 1 for deleted character and add 1 for conversion to character position.
if (m_caretPosition > -1 && !HasSelection())
{
// so subtract 1 for deleted character and add 1 for conversion to character position.
if (m_caretPosition > -1 && !HasSelection())
{
- GetBuffer().DeleteRangeWithUndo(wxRichTextRange(m_caretPosition, m_caretPosition),
- m_caretPosition, // Current caret position
- m_caretPosition-1, // New caret position
- this);
+ GetBuffer().DeleteRangeWithUndo(wxRichTextRange(m_caretPosition, m_caretPosition), this);
}
else
DeleteSelectedContent();
}
else
DeleteSelectedContent();
// Submit range in character positions, which are greater than caret positions,
if (m_caretPosition < GetBuffer().GetRange().GetEnd()+1 && !HasSelection())
{
// Submit range in character positions, which are greater than caret positions,
if (m_caretPosition < GetBuffer().GetRange().GetEnd()+1 && !HasSelection())
{
- GetBuffer().DeleteRangeWithUndo(wxRichTextRange(m_caretPosition+1, m_caretPosition+1),
- m_caretPosition, // Current caret position
- m_caretPosition+1, // New caret position
- this);
+ GetBuffer().DeleteRangeWithUndo(wxRichTextRange(m_caretPosition+1, m_caretPosition+1), this);
}
else
DeleteSelectedContent();
}
else
DeleteSelectedContent();
if (HasSelection())
{
long pos = m_selectionRange.GetStart();
if (HasSelection())
{
long pos = m_selectionRange.GetStart();
- GetBuffer().DeleteRangeWithUndo(m_selectionRange,
- m_caretPosition, // Current caret position
- pos, // New caret position
- this);
+ GetBuffer().DeleteRangeWithUndo(m_selectionRange, this);
m_selectionRange.SetRange(-2, -2);
if (newPos)
m_selectionRange.SetRange(-2, -2);
if (newPos)
- GetBuffer().DeleteRangeWithUndo(wxRichTextRange(from, to),
- m_caretPosition, // Current caret position
- from, // New caret position
- this);
+ GetBuffer().DeleteRangeWithUndo(wxRichTextRange(from, to), this);
LayoutContent();
if (!IsFrozen())
LayoutContent();
if (!IsFrozen())