#1823 giving line number to external editor

open
nobody
Usability (141)
5
2012-12-21
2006-05-06
Nova
No

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.

Discussion

  • Nova

    Nova - 2006-05-06
     
  • Kimmo Varis

    Kimmo Varis - 2006-05-07

    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!

     
  • Kimmo Varis

    Kimmo Varis - 2006-05-07

    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.

     
  • Nova

    Nova - 2006-05-07

    Logged In: YES
    user_id=1400773

    ok. thanks.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks