Looks like I've fixed the editing
bugs. Delete/Insert/Home/End/Ctrl-Delete all work as expected. Cursor gets redrawn properly. Scroll-to-cursor still missing. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -68,6 +68,7 @@ wxLayoutWindow::OnChar(wxKeyEvent& event)
|
||||
|
||||
long keyCode = event.KeyCode();
|
||||
wxPoint p;
|
||||
CoordType help;
|
||||
|
||||
switch(event.KeyCode())
|
||||
{
|
||||
@@ -100,11 +101,19 @@ wxLayoutWindow::OnChar(wxKeyEvent& event)
|
||||
m_llist.SetCursor(p);
|
||||
break;
|
||||
case WXK_DELETE :
|
||||
m_llist.Delete(1);
|
||||
if(event.ControlDown()) // delete to end of line
|
||||
{
|
||||
help = m_llist.GetLineLength(
|
||||
m_llist.FindCurrentObject(NULL))
|
||||
- m_llist.GetCursor().x;
|
||||
m_llist.Delete(help ? help : 1);
|
||||
}
|
||||
else
|
||||
m_llist.Delete(1);
|
||||
break;
|
||||
case WXK_BACK: // backspace
|
||||
m_llist.MoveCursor(-1);
|
||||
m_llist.Delete(1);
|
||||
if(m_llist.MoveCursor(-1))
|
||||
m_llist.Delete(1);
|
||||
break;
|
||||
case WXK_RETURN:
|
||||
m_llist.LineBreak();
|
||||
|
Reference in New Issue
Block a user