fixing editing semantics
minor fix
editing fix
fixed one last minor glitch
yet another minor fix
unit-tests + simplification
more protection against edge cases
formatting
formatting
more formatting
Formatting: CPAttributedStringTest.

Refs #2045.
Formatting: CPAttributedString.

Refs #2045.