// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System;
using System.Collections.Generic;
using System.Linq;
using Tango.Scripting.Editors.Document;
using Tango.Scripting.Editors.Utils;
namespace Tango.Scripting.Editors.Editing
{
/// <summary>
/// A simple selection.
/// </summary>
sealed class SimpleSelection : Selection
{
readonly TextViewPosition start, end;
readonly int startOffset, endOffset;
/// <summary>
/// Creates a new SimpleSelection instance.
/// </summary>
internal SimpleSelection(TextArea textArea, TextViewPosition start, TextViewPosition end)
: base(textArea)
{
this.start = start;
this.end = end;
this.startOffset = textArea.Document.GetOffset(start.Location);
this.endOffset