try this patch,

Index: EditorFactory.py
===================================================================
--- EditorFactory.py (revision 534)
+++ EditorFactory.py (working copy)
@@ -169,7 +169,7 @@
         return -1

     def getDoc(self, index):
-        if index < 0 or index > len(self.getDocuments()):
+        if index < 0 or index >= len(self.getDocuments()):
             return None
         return self.getDocuments()[index]

@@ -349,23 +349,16 @@
         self.skip_closing = True
         self.skip_page_change = True
         self.DeletePage(index)
-#        if index >= len(self.getDocuments()):
-#            index = len(self.getDocuments())-1
-#        if index >= 0:
-#            self.switch(self.getDoc(index))
-#        else:
-#            self.new()
-#        self.document.SetFocus()
         #if the page to close is not selected, no need to switch page
         if index == selected:
-            if index > 0:
+            if index >= 0:
                 if index >= len(self.getDocuments()):
                     index = len(self.getDocuments())-1
                 # only swith page when there is a page to switch to
                 self.switch(self.getDoc(index))
             else:
               self.new()
-        self.document.SetFocus()
+            self.document.SetFocus()

         self.callplugin('afterclosefile', self)



On Sat, Feb 6, 2010 at 9:00 AM, limodou <[email protected]> wrote:

> On Sat, Feb 6, 2010 at 11:18 PM, depython <[email protected]>
> wrote:
> > Ulipad 4.0 has the problem. When the edit pane has mutiple tabpages,
> > closing the first tabpage will create a new tabpage at the end of the
> > tab row.
> >
> > Ulipad 3.9 has no such problem.
> >
>
> I'll see it later, thanks.
>
>
> --
> I like python!
> UliPad <<The Python Editor>>: http://code.google.com/p/ulipad/
> UliWeb <<simple web framework>>: http://uliwebproject.appspot.com
> My Blog: http://hi.baidu.com/limodou
>

Reply via email to