Author: lluis
Date: 2006-04-03 19:46:37 -0400 (Mon, 03 Apr 2006)
New Revision: 58986

Modified:
   trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog
   
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Search/AllOpenDocumentIterator.cs
Log:
2006-04-04 Lluis Sanchez Gual  <[EMAIL PROTECTED]>

        * MonoDevelop.Ide.Gui.Search/AllOpenDocumentIterator.cs:
          Skip documents which are not text buffers while iterating
          through all open files.



Modified: trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog
===================================================================
--- trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog        2006-04-03 
23:42:23 UTC (rev 58985)
+++ trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog        2006-04-03 
23:46:37 UTC (rev 58986)
@@ -1,3 +1,9 @@
+2006-04-04 Lluis Sanchez Gual  <[EMAIL PROTECTED]>
+
+       * MonoDevelop.Ide.Gui.Search/AllOpenDocumentIterator.cs:
+         Skip documents which are not text buffers while iterating
+         through all open files.
+
 2006-04-04 Lluis Sanchez Gual  <[EMAIL PROTECTED]>   
 
        * MonoDevelop.Ide.addin.xml: Removed cshrp.net.

Modified: 
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Search/AllOpenDocumentIterator.cs
===================================================================
--- 
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Search/AllOpenDocumentIterator.cs
    2006-04-03 23:42:23 UTC (rev 58985)
+++ 
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Search/AllOpenDocumentIterator.cs
    2006-04-03 23:46:37 UTC (rev 58986)
@@ -55,45 +55,53 @@
                }
                
                public bool MoveForward() 
-               {
-                       int curIndex =  GetCurIndex();
-                       if (curIndex < 0) {
-                               return false;
-                       }
+               {
+                       do {
+                               int curIndex =  GetCurIndex();
+                               if (curIndex < 0) {
+                                       return false;
+                               }
+                               
+                               if (resetted) {
+                                       resetted = false;
+                                       continue;
+                               }
+                               
+                               int nextIndex = (curIndex + 1) % 
IdeApp.Workbench.Documents.Count;
+                               if (nextIndex == startIndex) {
+                                       return false;
+                               }
+                               IdeApp.Workbench.Documents [nextIndex].Select 
();
+                       } 
+                       while (Current == null);
                        
-                       if (resetted) {
-                               resetted = false;
-                               return true;
-                       }
-                       
-                       int nextIndex = (curIndex + 1) % 
IdeApp.Workbench.Documents.Count;
-                       if (nextIndex == startIndex) {
-                               return false;
-                       }
-                       IdeApp.Workbench.Documents [nextIndex].Select ();
                        return true;
                }
                
                public bool MoveBackward()
-               {
-                       int curIndex =  GetCurIndex();
-                       if (curIndex < 0) {
-                               return false;
-                       }
-                       if (resetted) {
-                               resetted = false;
-                               return true;
-                       }
+               {
+                       do {
+                               int curIndex =  GetCurIndex();
+                               if (curIndex < 0) {
+                                       return false;
+                               }
+                               if (resetted) {
+                                       resetted = false;
+                                       continue;
+                               }
+                               
+                               if (curIndex == 0)
+                                       curIndex = 
IdeApp.Workbench.Documents.Count - 1;
+                               else
+                                       curIndex--;
+                               
+                               if (curIndex == startIndex)
+                                       return false;
+
+                               IdeApp.Workbench.Documents [curIndex].Select ();
+                       }
+                       while (Current == null);
                        
-                       if (curIndex == 0)
-                               curIndex = IdeApp.Workbench.Documents.Count - 1;
-                       else
-                               curIndex--;
-                       
-                       if (curIndex == startIndex)
-                               return false;
-
-                       IdeApp.Workbench.Documents [curIndex].Select ();
                        return true;
                }
                

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to