based off winmerge 2.4.6 codebase.
this allows capable external editors to open any
compared files and automatically go to to the line
number that is selected in Winmerge.
eg: c:\editor.exe filename.cpp /900
usage: right click > open > with external editor
(TODO, not done) it would be much more versatile if
when in options when specifying external editor you coul
eg:
c:\editor.exe $file $linenum
and (for those editors that require a slash before line
number)
c:\editor.exe $file /$linenum
For better compatibility with other editors this
feature would need some option in the GUI to specify
the editor specific command switch used to go to a line.
until this gets fixed up by someone I understand this
patch being delayed into the codebase.
Logged In: YES
user_id=631874
Thanks for a patch!
Good idea. And I have a patch for those editor options, I
just haven't seen need for submitting it to SF.net before (I
used it to giving description texts for editor I use). It
should be pretty easy to expand it to handle more switches.
I dont' quite agree with implementation. It doesn't seem to
take account there might be several CMergeEditView's open
(and where is that new CMainFrame pointer to CMergeEditView
even set?).
There is function for getting active CMergeEditView in
CMainFrame:
CMergeEditView * CMainFrame::GetActiveMergeEditView();
use that when opening editor..
Also the code fails if cursor is in "Ghost" line, that gray
area of "missing" lines. Linenumber it gets is format
"first-last" which I doubt editors can handle. Probably best
is to just pick first of those numbers then.
Good start, needs some work still. :)
Oh and thanks for using our own patch-format!
Logged In: YES
user_id=631874
Oh, and when you are adding linenumber member to
CMergeEditView, please add it as a number. And convert to
string when needed.
Logged In: YES
user_id=1400773
ok. thanks.
Logged In: YES
user_id=631874
I submitted my patch for external editor params:
#1483405 Allow parameters for external editor
https://sourceforge.net/tracker/index.php?func=detail&aid=1483405&group_id=13216&atid=313216