diff --git a/src/ce_controls.pas b/src/ce_controls.pas index 90b08bc9..6f4d2e57 100644 --- a/src/ce_controls.pas +++ b/src/ce_controls.pas @@ -69,6 +69,7 @@ type function getCurrentPage: TCEPage; function getPageCount: integer; function getPage(index: integer): TCEPage; + function getSplitPage: TCEPage; procedure changedNotify; procedure updateButtonsState; @@ -83,6 +84,7 @@ type procedure movePageRight; procedure movePageLeft; + property splitPage: TCEPage read getSplitPage; property currentPage: TCEPage read getCurrentPage write setCurrentPage; property pageIndex: integer read fPageIndex write setPageIndex; property pageCount: integer read getPageCount; @@ -373,6 +375,14 @@ begin exit(TCEPage(fPages.Items[index])); end; +function TCEPageControl.getSplitPage: TCEPage; +begin + if fSplittedPageIndex = -1 then + exit(nil) + else + exit(getPage(fSplittedPageIndex)); +end; + procedure TCEPageControl.movePageRight; begin if fPageIndex = fPages.Count-1 then diff --git a/src/ce_editor.pas b/src/ce_editor.pas index 3d74408f..387ea8f4 100644 --- a/src/ce_editor.pas +++ b/src/ce_editor.pas @@ -199,6 +199,8 @@ begin exit('ICEMultiDocHandler'); end; +//TODO-cfeature: jump to definition, don't open/select tab if origin is in right split view + function TCEEditorWidget.documentCount: Integer; begin exit(PageControl.PageCount); @@ -347,6 +349,7 @@ end; procedure TCEEditorWidget.getSymbolLoc; var + page: TCEPage; srcpos, i, sum, linelen: Integer; fname: string; len: byte; @@ -354,8 +357,16 @@ begin if not DcdWrapper.available then exit; // DcdWrapper.getDeclFromCursor(fname, srcpos); - if fname <> fDoc.fileName then if fileExists(fname) then - openDocument(fname); + if (fname <> fDoc.fileName) and fileExists(fname) then + begin + page := pageControl.splitPage; + if assigned(page) then + begin + fDoc := TCESynMemo(page.Controls[0]); + if fDoc.fileName <> fname then + openDocument(fname); + end; + end; if srcpos <> -1 then begin sum := 0; diff --git a/wiki/wiki.todo.txt b/wiki/wiki.todo.txt index 6f29ec1a..091a6833 100644 --- a/wiki/wiki.todo.txt +++ b/wiki/wiki.todo.txt @@ -2,4 +2,5 @@ - project, output options, screenshot is outdated. - project config widget, base/overridden config specifications. Note about pre/post build proc as their options cant be overridden. - project config widget, base/overridden config. screenshot for widget view 'All categories'. -- applications options (MRU & reload last stuff). \ No newline at end of file +- applications options (MRU & reload last stuff). +- editor, toolbar description, split view description + screenshot. \ No newline at end of file