/// ------------------------------------------------------------------------------------ /// <summary> /// Go to the next paragraph looking at the selection information. /// </summary> /// ------------------------------------------------------------------------------------ public void GoToNextPara() { int level = CurrentSelection.GetNumberOfLevels(SelectionHelper.SelLimitType.Top) - 1; bool fEnd = CurrentSelection.Selection.EndBeforeAnchor; while (level >= 0) { int iBox = CurrentSelection.Selection.get_BoxIndex(fEnd, level); IVwSelection sel = Callbacks.EditedRootBox.MakeSelInBox(CurrentSelection.Selection, fEnd, level, iBox + 1, true, false, true); if (sel != null) { CurrentSelection.RootSite.ScrollSelectionIntoView(sel, VwScrollSelOpts.kssoDefault); return; } // Try the next level up level--; } }