Replaced editor.doc() with editor.filename()