refactored indentation detection
fixed trouble with multiple line selection
for fixed too