Editor fixes

Couple of fixes that were originally meant to fix #1910.  I think they're still useful to apply though.