Skip to content

Commit 690b92d

Browse files
authored
Merge pull request #140 from jimfoye/jimfoye-patch-fix12
Fix #12, End key behavior and trailing whitespace
2 parents 99dbb11 + 654c22e commit 690b92d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ICSharpCode.AvalonEdit/Editing/CaretNavigationCommandHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ static TextViewPosition GetStartOfLineCaretPosition(int oldVC, VisualLine visual
262262

263263
static TextViewPosition GetEndOfLineCaretPosition(VisualLine visualLine, TextLine textLine)
264264
{
265-
int newVC = visualLine.GetTextLineVisualStartColumn(textLine) + textLine.Length - textLine.TrailingWhitespaceLength;
265+
int newVC = visualLine.GetTextLineVisualStartColumn(textLine) + textLine.Length - textLine.NewlineLength;
266266
TextViewPosition pos = visualLine.GetTextViewPosition(newVC);
267267
pos.IsAtEndOfLine = true;
268268
return pos;

0 commit comments

Comments
 (0)