diff --git a/src/viewer/text/textarea.c b/src/viewer/text/textarea.c index 2edb3a812..8a7c36e06 100644 --- a/src/viewer/text/textarea.c +++ b/src/viewer/text/textarea.c @@ -611,7 +611,8 @@ textarea_edit(int op, struct terminal *term_, struct form_state *fs_, fn = save_textarea_file(fs_->value); if (!fn) return; - ed = get_opt_str("document.browse.forms.editor", ses); + ed = get_opt_str("document.browse.forms.editor", + doc_view->session); if (!ed || !*ed) { ed = getenv("EDITOR"); if (!ed || !*ed) ed = "vi";