Ticket #8413: 8413.patch

File 8413.patch, 875 bytes (added by David, 11 years ago)
  • src/interface/edithandler.cpp

     
    990990            // See wxWidget's wxExecute in src/msw/utilsexc.cpp
    991991            // WX_DDE#<command>#DDE_SERVER#DDE_TOPIC#DDE_COMMAND
    992992            editor = cmd.Mid(7);
    993             int pos = editor.Find('#');
     993
     994            // The "command" string will either contain the argument (file to open)
     995            // or be the editor command only.
     996            int pos;
     997            int posHash = editor.Find('#');
     998            int posComma = editor.Find(',');
     999            if ((posComma != wxNOT_FOUND) && (posComma < posHash))
     1000            {
     1001                // Argument within "command"
     1002                pos = posComma;
     1003            }
     1004            else
     1005            {
     1006                // "command" only contains editor
     1007                pos = posHash;
     1008            }
     1009
    9941010            if (pos < 1)
    9951011                return cmd;
    9961012            editor = editor.Left(pos);