X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/39a12997e2d7705a2760a1198932f23f4e590aab..ddf3a8574f657dcb8c53fc5908e7bebbde1994b5:/sbr/geteditor.c?ds=inline diff --git a/sbr/geteditor.c b/sbr/geteditor.c index 9889a5e3..a0071998 100644 --- a/sbr/geteditor.c +++ b/sbr/geteditor.c @@ -5,8 +5,10 @@ * complete copyright information. */ -#include -#include +#include "h/mh.h" +#include "geteditor.h" +#include "context_find.h" +#include "h/utils.h" static char *default_editor = NULL; @@ -16,12 +18,12 @@ get_default_editor(void) char *str; if (default_editor) - return default_editor; + return default_editor; if (!(str = context_find("editor")) && !(str = getenv("VISUAL")) && - !(str = getenv("EDITOR"))) { - str = "vi"; + !(str = getenv("EDITOR"))) { + str = "prompter"; } - return (default_editor = str); + return default_editor = str; }