void OnTextReplacing (object sender, MonoDevelop.Core.Text.TextChangeEventArgs e) { lock (document) { if (lastChange == null) lastChange = new ChangeInfo (e.Offset, new System.Web.Razor.Text.SeekableTextReader ((sender as MonoDevelop.Ide.Editor.ITextDocument).Text)); if (e.ChangeDelta > 0) { lastChange.Length += e.InsertionLength; } else { lastChange.Length -= e.RemovalLength; } } }
void OnTextReplacing(object sender, DocumentChangeEventArgs e) { if (lastChange == null) { lastChange = new ChangeInfo(e.Offset, new SeekableTextReader((sender as TextDocument).Text)); } if (e.ChangeDelta > 0) { lastChange.Length += e.InsertionLength; } else { lastChange.Length -= e.RemovalLength; } }
static TextChange CreateTextChange(RazorCSharpParserContext context, SeekableTextReader source) { ChangeInfo lastChange = context.GetLastTextChange(); if (lastChange == null) { return(new TextChange(0, 0, new SeekableTextReader(String.Empty), 0, source.Length, source)); } if (lastChange.DeleteChange) { return(new TextChange(lastChange.StartOffset, lastChange.AbsoluteLength, lastChange.Buffer, lastChange.StartOffset, 0, source)); } return(new TextChange(lastChange.StartOffset, 0, lastChange.Buffer, lastChange.StartOffset, lastChange.AbsoluteLength, source)); }
void OnTextReplacing(object sender, MonoDevelop.Core.Text.TextChangeEventArgs e) { lock (document) { if (lastChange == null) { lastChange = new ChangeInfo(e.Offset, new System.Web.Razor.Text.SeekableTextReader((sender as MonoDevelop.Ide.Editor.ITextDocument).Text)); } if (e.ChangeDelta > 0) { lastChange.Length += e.InsertionLength; } else { lastChange.Length -= e.RemovalLength; } } }
public void ClearLastTextChange() { lock (document) lastChange = null; }
void OnTextReplacing (object sender, DocumentChangeEventArgs e) { if (lastChange == null) lastChange = new ChangeInfo (e.Offset, new SeekableTextReader((sender as TextDocument).Text)); if (e.ChangeDelta > 0) { lastChange.Length += e.InsertionLength; } else { lastChange.Length -= e.RemovalLength; } }
void ClearLastChange () { lastChange = null; }
public void ClearLastTextChange () { lock (document) lastChange = null; }
void ClearLastChange() { lastChange = null; }