Skip to content

Commit 6053a63

Browse files
committed
Fix #40 cursor left should not go to prev line if virtual space
1 parent 532cab0 commit 6053a63

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

ICSharpCode.AvalonEdit/Editing/CaretNavigationCommandHandler.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,8 @@ static TextViewPosition GetPrevCaretPosition(TextView textView, TextViewPosition
295295
if (pos >= 0) {
296296
return visualLine.GetTextViewPosition(pos);
297297
} else {
298+
if(enableVirtualSpace && mode == CaretPositioningMode.Normal)
299+
return caretPosition;
298300
// move to end of previous line
299301
DocumentLine previousDocumentLine = visualLine.FirstDocumentLine.PreviousLine;
300302
if (previousDocumentLine != null) {

0 commit comments

Comments
 (0)