|
|
|
@ -52,7 +52,15 @@ namespace ICSharpCode.XamlDesigner |
|
|
|
try { |
|
|
|
try { |
|
|
|
uxTextEditor.ScrollTo(error.Line, error.Column); |
|
|
|
uxTextEditor.ScrollTo(error.Line, error.Column); |
|
|
|
uxTextEditor.CaretOffset = uxTextEditor.Document.GetOffset(error.Line, error.Column); |
|
|
|
uxTextEditor.CaretOffset = uxTextEditor.Document.GetOffset(error.Line, error.Column); |
|
|
|
} catch (ArgumentException) { |
|
|
|
|
|
|
|
|
|
|
|
int n = 0; |
|
|
|
|
|
|
|
char chr; |
|
|
|
|
|
|
|
while ((chr = uxTextEditor.Document.GetCharAt(uxTextEditor.CaretOffset + n)) != ' ' && chr != '.' && chr != '<' && chr != '>' && chr != '"') |
|
|
|
|
|
|
|
{ n++; } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
uxTextEditor.SelectionLength = n; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
catch (ArgumentException) { |
|
|
|
// invalid line number
|
|
|
|
// invalid line number
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|