+
+ // If we deleted the selection here, we must not execute the
+ // deletion in Delete/Backspace handling.
+ bool deletedSelection = false;
+ // pressing any non-arrow key optionally replaces the selection:
+ if(m_AutoDeleteSelection
+ && !m_Selecting
+ && m_llist->HasSelection()
+ && ! IsDirectionKey(keyCode)
+ && ! (event.AltDown() || ctrlDown)
+ )
+ {
+ m_llist->DeleteSelection();
+ deletedSelection = true;
+ }
+