Ejemplo n.º 1
0
 public int Exec(ref Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
 {
     if (manager.IsEnabled)
     {
         IEmacsCommandMetadata commandMetadata = manager.GetCommandMetadata((int)nCmdID, pguidCmdGroup);
         if (commandMetadata != null)
         {
             if (commandMetadata != null)
             {
                 try
                 {
                     manager.Execute(view, commandMetadata, true);
                     manager.AfterSearch = false;
                 }
                 catch (Exception ex)
                 {
                     manager.UpdateStatus(ex.Message, false);
                     return(1);
                 }
             }
             return(0);
         }
         if (pguidCmdGroup == VSConstants.VSStd2K && (int)nCmdID == 1 && manager.UniversalArgument.HasValue &&
             manager.UniversalArgument.Value > 1)
         {
             int num1 = manager.UniversalArgument.Value;
             while (num1-- > 0)
             {
                 int num2 = router.ExecuteCommand(ref pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut);
                 if (num2 != 0)
                 {
                     return(num2);
                 }
             }
             return(0);
         }
         if (pguidCmdGroup == VSConstants.VSStd2K && ((int)nCmdID == 122 || (int)nCmdID == 123))
         {
             MarkSession.GetSession(view).PushMark(true);
             manager.AfterSearch = true;
         }
     }
     return(1);
 }
Ejemplo n.º 2
0
 private static bool ShouldExtendSelection(IEditorOperations editorOperations)
 {
     return(MarkSession.GetSession(editorOperations.TextView).IsActive);
 }