public ITextViewLine Line(int index)
		{
			ITextViewLine cached;
			if (_cachedLines.TryGetValue(index, out cached))
				return cached;

			var newLine = new TextViewLine(this, Buffer.CurrentSnapshot.Lines[index]);
			_cachedLines.Add(index, newLine);
			return newLine;
		}
Example #2
0
        public ITextViewLine Line(int index)
        {
            ITextViewLine cached;

            if (_cachedLines.TryGetValue(index, out cached))
            {
                return(cached);
            }

            var newLine = new TextViewLine(this, Buffer.CurrentSnapshot.Lines[index]);

            _cachedLines.Add(index, newLine);
            return(newLine);
        }