Fix infinite loop when saving empty document
Merge branch 'refs/heads/develop' into develop2

Conflicts:
	pyqode/core/editor.py