fix #650 cursor jumping after paste with folded code