1) It is not possible to use command line options with an external editor as described in the help. Entering a command line option for an external editor in Settings -> System -> External Editor and then trying to open a file in an external editor with right mouse button -> Open -> With external editor causes error message "Unknown file extension of external editor"
2) Would it be possible to introduce some "regular expressions" to be usable as (a part of) an commandline option for an external editor. The most interesting ones would be the file name and line, in order to be able to provide the file name and also the current active line (where the cursor is) to the external editor. "Regular expressions" for that could be e.g. "$FILE" and "$LINE", which (when entered as (a part of) an external editor command line option) would be replaced by the current file name (with the complete path) and the currently active line. Most sophisticated editors provide a possibility to open a file on a given line provided with a command line of the type (just a example):
editor.exe -file -line
Thanks for the great tool!
Logged In: YES
user_id=631874
Originator: NO
Thanks for reporting this bug. I can reproduce it and I am investigating it now...
Logged In: YES
user_id=631874
Originator: NO
The bug is a regression from STL string conversion. CString::Find() returned -1 when it didn't find a string, but STL string returns std::string.npos. These checks weren't updated but left to compare to -1 and so the find didn't work correctly.
Attached patch fixes the bug.
This bug happens in trunk, in 2.10 branch and in 2.8 branch. I will commit the patch for each.
File Added: FixEditorCmdline.patch
The patch
Logged In: YES
user_id=631874
Originator: NO
As the bug and the fix is so obvious I immediately committed the fix to SVN trunk:
Completed: At revision: 5739
Logged In: YES
user_id=631874
Originator: NO
Committed to 2.10 branch:
Completed: At revision: 5744
Committed to 2.8 branch:
Completed: At revision: 5745
Closing now as fixed. This bug will be fixed in future releases.