internal Enumerator(GapBuffer <T> buffer) { _gapBuffer = buffer; _index = 0; _version = _gapBuffer._version; _current = default(T); }
/// <summary> /// Simulates the insertion of the whole text, use this to reset the lines info /// (when switching document for instance) /// </summary> internal void Reset() { _lastEncoding = Npp.Encoding; _oneByteCharEncoding = _lastEncoding.Equals(Encoding.Default); // bypass the hard work for simple encoding if (_oneByteCharEncoding) { return; } _linesList = new GapBuffer <int> { 0, 0 }; var scn = new SCNotification { linesAdded = SciGetLineCount() - 1, position = 0, length = SciGetLength() }; scn.text = Npp.Sci.Send(SciMsg.SCI_GETRANGEPOINTER, new IntPtr(scn.position), new IntPtr(scn.length)); OnInsertedText(scn); }
/// <summary> /// Initializes a new instance /// </summary> public DocumentLines() { _linesList = new GapBuffer <int> { 0, 0 }; }