[Lazarus] Editor tabs and opening new files

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Thu May 5 14:28:37 CEST 2016


On 2016-04-29 17:17, Bart wrote:
> That would indeed be a nice option.

In the mean time I made a small patch that adds that behaviour.

NOTE:
  It’s not a configurable setting, just a hard-coded changes of
  behaviour.

=====================================
diff --git a/ide/sourceeditor.pp b/ide/sourceeditor.pp
index d39b3a6..81a1ea8 100644
--- a/ide/sourceeditor.pp
+++ b/ide/sourceeditor.pp
@@ -7154,7 +7154,8 @@ begin
     if NewPageNum >= 0 then
       PageNum := NewPageNum
     else
-      Pagenum := PageIndex+1;
+//      Pagenum := PageIndex+1;
+      Pagenum := PageCount; // graemeg: add new file to end of tabs list
     Pagenum := Max(0,Min(PageNum, PageCount));
     if ATabCaption = '' then
       ATabCaption := Manager.FindUniquePageName('', nil);
=====================================

Regards,
  Graeme

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp




More information about the Lazarus mailing list