Browse Source

Extend selection - fix for one-line methods.

pull/15/head
mkonicek 15 years ago
parent
commit
a201a4b412
  1. 5
      src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CodeEditorView.cs

5
src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CodeEditorView.cs

@ -436,6 +436,11 @@ namespace ICSharpCode.AvalonEdit.AddIn
var parent = currentNode.Parent; var parent = currentNode.Parent;
// it can happen that parent region exactly matches child region - in this case we need to advance even to the next parent
// bc otherwise the selection would never move
while (parent != null && parent.StartLocation == selectionStart && parent.EndLocation == selectionEnd) {
parent = parent.Parent;
}
if (parent == null) if (parent == null)
return; return;
selectionStart = parent.StartLocation; selectionStart = parent.StartLocation;

Loading…
Cancel
Save