return flags & EDITOR_ERROR_MASK;
}
-static gint is_valid_editor_command(gint n)
+gboolean is_valid_editor_command(gint n)
{
return (n >= 0 && n < GQ_EDITOR_SLOTS
&& options->editor[n].command
const gchar *editor_get_name(gint n);
+gboolean is_valid_editor_command(gint n);
+
#endif
#include "trash.h"
#include "utilops.h"
-
+#include "editors.h"
#include "filedata.h"
#include "ui_fileops.h"
#include "ui_misc.h"
{
gchar *buf;
- if (options->editor[CMD_DELETE].command)
+ if (is_valid_editor_command(CMD_DELETE))
{
buf = g_strdup(_("Deletion by external command"));
}
break;
}
- if (ud->external_command != -1 && options->editor[ud->external_command].command)
+ if (is_valid_editor_command(ud->external_command))
{
gint flags;