public virtual void WrapLines(int startLine, int endLine, int width)
{
//if (startLine < 0)
// throw new ArgumentOutOfRangeException("startLine", _resources.Exception_InvalidStartLine);
//if (endLine < startLine)
// throw new ArgumentOutOfRangeException("endLine", _resources.Exception_InvalidLineRange);
// Convert line indexes to positions within the line
int startPos = this._scintilla.DirectMessage(NativeMethods.SCI_POSITIONFROMLINE, new IntPtr(startLine), IntPtr.Zero).ToInt32();
int endPos = this._scintilla.DirectMessage(NativeMethods.SCI_POSITIONFROMLINE, new IntPtr(endLine), IntPtr.Zero).ToInt32();
//if (startPos == -1)
// throw new ArgumentOutOfRangeException("startLine", string.Format(CultureInfo.InvariantCulture, _resources.Exception_InvalidLine, "start"));
//if (endPos == -1)
// throw new ArgumentOutOfRangeException("endLine", string.Format(CultureInfo.InvariantCulture, _resources.Exception_InvalidLine, "end"));
// Set the target positions (which Scintilla will convert back to line indexes)
this._scintilla.DirectMessage(NativeMethods.SCI_SETTARGETSTART, new IntPtr(startPos), IntPtr.Zero);
this._scintilla.DirectMessage(NativeMethods.SCI_SETTARGETEND, new IntPtr(endPos), IntPtr.Zero);
this._scintilla.DirectMessage(NativeMethods.SCI_LINESSPLIT, new IntPtr(width), IntPtr.Zero);
}