Set cursor on unfold; make folding more reliable

ref #44