Esempio n. 1
0
        public override void HandleTextInput(TextAddedMessage message)
        {
            if (message.Text == TextProperties.Properties.NEWLINE)
            {
                if (IsCaretInbetweenTags(message.PrevCaretPosition))
                {
                    IncreaseFoldHeight(message.PrevCaretPosition);
                }
                else
                {
                    MoveFoldsDown(message.PrevCaretPosition);
                }
            }
            else
            {
                if (!FoldingAlgorithm.CanRun(message.Text))
                {
                    return;
                }

                RunFolding(message.Text, message.NewCaretPosition);
            }

            RedrawFolds();
        }
Esempio n. 2
0
 public override void HandleTextInput(TextAddedMessage message)
 {
     if (message.Text == TextProperties.Properties.NEWLINE)
     {
         linesCount++;
         Push();
         UpdateSize();
     }
 }
Esempio n. 3
0
 public abstract void HandleTextInput(TextAddedMessage message);