diff options
| author | nyamatongwe <unknown> | 2009-07-19 01:16:31 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2009-07-19 01:16:31 +0000 | 
| commit | 0ea7c707827ec481e385d765ae87f0903735d70e (patch) | |
| tree | 423bbff449b489ad52e3b890b4551a864bfa665e /src/Editor.cxx | |
| parent | a09d2105005ea791cc1f1222373d6008c08879e1 (diff) | |
| download | scintilla-mirror-0ea7c707827ec481e385d765ae87f0903735d70e.tar.gz | |
When both Ctrl and Shift down when mouse pressed, prioritise Shift so that
current selection is extended rather than allowing creation of a new empty
selection.
Diffstat (limited to 'src/Editor.cxx')
| -rw-r--r-- | src/Editor.cxx | 22 | 
1 files changed, 12 insertions, 10 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 929db7d66..3085bd6ec 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -5639,16 +5639,18 @@ void Editor::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, b  			SetMouseCapture(true);  			if (inDragDrop != ddInitial) {  				SetDragPosition(SelectionPosition(invalidPosition)); -				if (ctrl && multipleSelection) { -					InvalidateSelection(SelectionRange(newPos), true); -					sel.AddSelection(newPos); -				} else if (!shift) { -					InvalidateSelection(SelectionRange(newPos), true); -					if (sel.Count() > 1)  -						Redraw(); -					sel.Clear(); -					sel.selType = alt ? Selection::selRectangle : Selection::selStream; -					SetSelection(newPos, newPos); +				if (!shift) { +					if (ctrl && multipleSelection) { +						InvalidateSelection(SelectionRange(newPos), true); +						sel.AddSelection(newPos); +					} else { +						InvalidateSelection(SelectionRange(newPos), true); +						if (sel.Count() > 1)  +							Redraw(); +						sel.Clear(); +						sel.selType = alt ? Selection::selRectangle : Selection::selStream; +						SetSelection(newPos, newPos); +					}  				}  				sel.selType = alt ? Selection::selRectangle : Selection::selStream;  				selectionType = selChar;  | 
