예제 #1
0
        private static int InsertText(TextBuffer buffer, int offset, string data, Stack stack)
        {
            TagStart tagStart = (TagStart)stack.Peek();
            TextIter insertAt = buffer.GetIterAtOffset(offset);
            TextTag  textTag  = DocumentUtils.GetAssociatedTextTag(buffer, tagStart.Tag);

            DocumentUtils.AddText(buffer, ref insertAt, data, textTag);
//		buffer.InsertWithTags (ref insertAt, data, textTag);

                #if DEBUG
            Console.WriteLine("Text: {0} Value: {1} Start: {2}", textTag.Name, data, offset);
                #endif

            return(insertAt.Offset);
        }