From 9d081bec5ad44b6c10699c4573f7b837425f626d Mon Sep 17 00:00:00 2001 From: Slava Zanko <slavazanko@gmail.com> Date: Thu, 13 Jun 2013 13:58:00 +0300 Subject: [PATCH] Ticket #3020: segfault on creating new file in external editor Fixes for compiling code without warnings and errors when the --disable-editor option is specified Signed-off-by: Slava Zanko <slavazanko@gmail.com> --- src/filemanager/cmd.c | 2 ++ tests/src/Makefile.am | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/filemanager/cmd.c b/src/filemanager/cmd.c index 569170815..9f169bcf9 100644 --- a/src/filemanager/cmd.c +++ b/src/filemanager/cmd.c @@ -790,6 +790,8 @@ do_edit_at_line (const vfs_path_t * what_vpath, gboolean internal, long start_li else #endif /* USE_INTERNAL_EDIT */ { + (void) internal; + if (editor == NULL) { editor = getenv ("EDITOR"); diff --git a/tests/src/Makefile.am b/tests/src/Makefile.am index 92b045c30..f3698a9f8 100644 --- a/tests/src/Makefile.am +++ b/tests/src/Makefile.am @@ -1,4 +1,8 @@ -SUBDIRS = . editor filemanager +SUBDIRS = . filemanager + +if USE_EDIT +SUBDIRS += editor +endif AM_CPPFLAGS = \ $(GLIB_CFLAGS) \