From c93e94db6f4e81528bb4b7b01eda1d484255bf49 Mon Sep 17 00:00:00 2001 From: "Zane U. Ji" Date: Sat, 4 Aug 2012 23:29:43 +0800 Subject: [PATCH] Bug #2168615 Can't delete block of XML --- src/xmlctrl.cpp | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/src/xmlctrl.cpp b/src/xmlctrl.cpp index 681bf15..426c088 100755 --- a/src/xmlctrl.cpp +++ b/src/xmlctrl.cpp @@ -347,41 +347,6 @@ void XmlCtrl::handleDelete ( wxKeyEvent& event ) validationRequired = true; - // unindent range - int start, end, startLine, endLine; - start = GetSelectionStart(); - end = GetSelectionEnd(); - startLine = LineFromPosition ( start ); - endLine = LineFromPosition ( end ); - - // add test so range unindentation only happens when caret is flush with left margin - int column = GetColumn ( GetCurrentPos() ); - - if ( startLine != endLine && !column) - { - if ( startLine > endLine ) - { - int temp; - temp = startLine; - startLine = endLine; - endLine = temp; - temp = start; - start = end; - end = temp; - } - if ( GetColumn ( start ) < GetLineIndentation ( startLine ) && - GetColumn ( end ) < GetLineIndentation ( endLine ) ) - { - for ( int i = startLine; i <= endLine; i++ ) - { - int current = GetLineIndentation ( i ); - if ( current > 0 ) - SetLineIndentation ( i, current - 1 ); - } - return; - } - } - if ( !canMoveRightAt ( GetCurrentPos() ) && GetSelectionStart() == GetSelectionEnd() ) {