From d8afa085aba4f6b61f29bee5e896623bb5448605 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Thu, 30 Jul 2009 08:29:43 +0000 Subject: When using Ctrl+Drag for multiple selection when previous selections dragged over but then that area is deselected, reveal the previous selections again. This allows the user to undo some bad effects when the mouse moves further than wanted. --- src/Selection.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Selection.h') diff --git a/src/Selection.h b/src/Selection.h index ff13f2130..c18e5c02e 100644 --- a/src/Selection.h +++ b/src/Selection.h @@ -123,9 +123,11 @@ struct SelectionRange { class Selection { std::vector ranges; + std::vector rangesSaved; SelectionRange rangeRectangular; size_t mainRange; bool moveExtends; + bool tentativeMain; public: enum selTypes { noSel, selStream, selRectangle, selLines, selThin }; selTypes selType; @@ -150,13 +152,15 @@ public: void TrimSelection(SelectionRange range); void SetSelection(SelectionRange range); void AddSelection(SelectionRange range); - void AddSelection(SelectionPosition spPos); + void TentativeSelection(SelectionRange range); + void CommitTentative(); int CharacterInSelection(int posCharacter) const; int InSelectionForEOL(int pos) const; int VirtualSpaceFor(int pos) const; void Clear(); void RemoveDuplicates(); void RotateMain(); + bool Tentative() const { return tentativeMain; } }; #ifdef SCI_NAMESPACE -- cgit v1.2.3