# HG changeset patch # User Rik # Date 1427996135 25200 # Node ID 002576bbba1025c01264510266bff98e2d0b1397 # Parent 9c26eee65266890e1fcc97e35204566160ec9ecf Fix edit() not opening an editor when cmdline arg --no-gui given (bug #44695). edit.m (do_edit): Use isguirunning() to decide whether to call __octave_link_edit_file__ or external system call. diff -r 9c26eee65266 -r 002576bbba10 scripts/miscellaneous/edit.m --- a/scripts/miscellaneous/edit.m Thu Apr 02 13:28:41 2015 -0400 +++ b/scripts/miscellaneous/edit.m Thu Apr 02 10:35:35 2015 -0700 @@ -546,12 +546,9 @@ function do_edit (editor, file, mode) - ## Give the hook function a chance. - ## If that fails, fall back on running an editor with the system function. - - status = __octave_link_edit_file__ (file); - - if (! status) + if (isguirunning ()) + __octave_link_edit_file__ (file); + else system (sprintf (undo_string_escapes (editor), ['"' file '"']), [], mode); endif