예제 #1
0
 private void HandleEnterKey()
 {
     if (!_inMultiLineEdit)
     {
         if (!CurrentCommand.IsNullOrEmpty())
         {
             if (!this.IsCommandComplete)
             {
                 _inMultiLineEdit = true;
                 ShowPromptContinuation();
                 return;
             }
             ProcessCurrentCommand(CurrentCommand);
         }
         ShowPrompt();
     }
     else
     {
         string curLine = GetLastLine(CurrentCommand);
         if (curLine.IsNullOrEmptyOrWhiteSpace())
         {
             _inMultiLineEdit = false;
             ProcessCurrentCommand(CurrentCommand);
             ShowPrompt();
         }
         else
         {
             ShowPromptContinuation();
         }
     }
 }