use replaceText() instead of remove and add, so single undo action will revert to origin document.
author Alex Turbov
()
committer Alex Turbov
()
commit 0255071fd31d5bfd99055f7d0e4a97844855b94f
tree 081c6fdac4599aadb72c70eaa003128896369a1c
parent 32787f7e69bd16179c3aab4217c1f6f4a0f58fc9
use replaceText() instead of remove and add, so single undo action will revert to origin document.
also add a little optimization when checking for selection presence.
addons/kate/pate/src/plugins/xml_pretty.py