示例#1
0
        void Buffer_LineAdditionEvent(object sender, CodeBufferEventArgs e)
        {
            for (int i = 0; i < e.LineCount; i++)
            {
                int lptr      = e.LineStart + i;
                int charCount = buffer[lptr].PrintableLength;
                if (charCount > buffer.longestLineCharCount)
                {
                    buffer.longestLineIdx       = lptr;
                    buffer.longestLineCharCount = charCount;
                }
                else if (lptr <= buffer.longestLineIdx)
                {
                    buffer.longestLineIdx++;
                }
                if (parser == null)
                {
                    continue;
                }
                parser.tryParseBufferLine(e.LineStart + i);
            }
            measureLeftMargin();

            if (parser != null)
            {
                parser.reparseSource();
            }

            updatePrintedLines();
            updateMaxScrollY();
            RegisterForGraphicUpdate();
        }
示例#2
0
 void Buffer_FoldingEvent(object sender, CodeBufferEventArgs e)
 {
     updatePrintedLines();
     updateOnScreenCurLineFromBuffCurLine();
     updateMaxScrollY();
     RegisterForGraphicUpdate();
 }
示例#3
0
        void Buffer_LineUpadateEvent(object sender, CodeBufferEventArgs e)
        {
            bool trigFindLongestLine = false;

            for (int i = 0; i < e.LineCount; i++)
            {
                int lptr = e.LineStart + i;
                if (lptr == buffer.longestLineIdx)
                {
                    trigFindLongestLine = true;
                }
                else if (buffer[lptr].PrintableLength > buffer.longestLineCharCount)
                {
                    buffer.longestLineCharCount = buffer[lptr].PrintableLength;
                    buffer.longestLineIdx       = lptr;
                }
            }
            if (trigFindLongestLine)
            {
                findLongestLineAndUpdateMaxScrollX();
            }

            RegisterForGraphicUpdate();
            notifyPositionChanged();
            isDirty = true;
        }
示例#4
0
 void Buffer_LineUpadateEvent(object sender, CodeBufferEventArgs e)
 {
     for (int i = 0; i < e.LineCount; i++)
     {
         TryParseBufferLine(e.LineStart + i);
     }
     reparseSource();
 }
示例#5
0
        void Buffer_LineRemoveEvent(object sender, CodeBufferEventArgs e)
        {
            bool trigFindLongestLine = false;

            for (int i = 0; i < e.LineCount; i++)
            {
                int lptr = e.LineStart + i;
                if (lptr <= buffer.longestLineIdx)
                {
                    trigFindLongestLine = true;
                }
            }
            if (trigFindLongestLine)
            {
                findLongestLineAndUpdateMaxScrollX();
            }

            measureLeftMargin();
            updatePrintedLines();
            updateMaxScrollY();
            RegisterForGraphicUpdate();
        }
示例#6
0
 void Buffer_LineRemoveEvent(object sender, CodeBufferEventArgs e)
 {
     reparseSource();
 }
示例#7
0
 void Buffer_LineAdditionEvent(object sender, CodeBufferEventArgs e)
 {
 }