private bool ClampToLength(ref int offset) { return(ActiproEditor.Clamp(ref offset, Math.Max(0, this.editor.Document.Length - 1))); }
private bool ClampToLineCount(ref int line) { return(ActiproEditor.Clamp(ref line, Math.Max(0, this.editor.Document.Lines.Count - 1))); }