IEditor GetNextEditor(bool previous = false) { if (!ShowSearchIn || SearchIn == SearchScope.CurrentDocument || Editors == null) { return(GetCurrentEditor()); } List <object> l = new List <object>(Editors.Cast <object>()); int i = l.IndexOf(CurrentEditor); if (i >= 0) { i = (i + (previous ? l.Count - 1 : +1)) % l.Count; CurrentEditor = l[i]; } return(GetCurrentEditor()); }
private IEditor GetNextEditor(bool previous = false) { if (!ShowSearchIn || SearchIn == SearchScope.CurrentDocument || Editors == null) { return(GetCurrentEditor()); } var editors = new List <object>(Editors.Cast <object>()); var i = editors.IndexOf(CurrentEditor); if (i >= 0) { i = (i + (previous ? editors.Count - 1 : +1)) % editors.Count; CurrentEditor = editors[i]; } return(GetCurrentEditor()); }