• test mod to not use stdio mode for local external editors

    From Xenos #1@60.Wwivnet@11:1/101 to All on Wed Jul 24 14:22:05 2024

    here's a short code mod that disables stdio mode for local external editors.

    diff --git a/bbs/external_edit.cpp b/bbs/external_edit.cpp
    index 47c7b9431..97fb512fd 100644
    --- a/bbs/external_edit.cpp
    +++ b/bbs/external_edit.cpp
    @@ -76,7 +76,7 @@ static bool external_edit_internal(const std::string& edit_filename, const std::
    cl.args(tft_fn.string(), std::to_string(a()->user()->screen_width()),
    std::to_string(num_screen_lines), std::to_string(numlines));

    - ExecuteExternalProgram(cl, ansir_to_flags(editor.ansir) | EFLAG_NO_CHANGE_DIR);
    + ExecuteExternalProgram(cl, ansir_to_flags(a()->sess().incom() ? editor.ansir : editor.ansir & ~ansir_stdio) | EFLAG_NO_CHANGE_DIR);
    bout.clear_lines_listed();

    const auto file_time_now = File::Exists(tft_fn) ? File::last_write_time(tft_fn) : 0;

    could be better, but with this mod, i can use external editors remotely and locally properly.

    note that the ideal setup would be that our external editors can also switch stdio on and off based on remote or local modes.

    see https://github.com/wwivbbs/wwiv/issues/1580

    A .-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-.
    /*\ | /\liens