@@ -80,17 +80,17 @@ export class CursorMoveCommands {
8080 ) ;
8181 }
8282
83- public static moveToEndOfLine ( viewModel : IViewModel , cursors : CursorState [ ] , inSelectionMode : boolean ) : PartialCursorState [ ] {
83+ public static moveToEndOfLine ( viewModel : IViewModel , cursors : CursorState [ ] , inSelectionMode : boolean , sticky : boolean ) : PartialCursorState [ ] {
8484 let result : PartialCursorState [ ] = [ ] ;
8585 for ( let i = 0 , len = cursors . length ; i < len ; i ++ ) {
8686 const cursor = cursors [ i ] ;
87- result [ i ] = this . _moveToLineEnd ( viewModel , cursor , inSelectionMode ) ;
87+ result [ i ] = this . _moveToLineEnd ( viewModel , cursor , inSelectionMode , sticky ) ;
8888 }
8989
9090 return result ;
9191 }
9292
93- private static _moveToLineEnd ( viewModel : IViewModel , cursor : CursorState , inSelectionMode : boolean ) : PartialCursorState {
93+ private static _moveToLineEnd ( viewModel : IViewModel , cursor : CursorState , inSelectionMode : boolean , sticky : boolean ) : PartialCursorState {
9494 const viewStatePosition = cursor . viewState . position ;
9595 const viewModelMaxColumn = viewModel . getLineMaxColumn ( viewStatePosition . lineNumber ) ;
9696 const isEndOfViewLine = viewStatePosition . column === viewModelMaxColumn ;
@@ -100,21 +100,21 @@ export class CursorMoveCommands {
100100 const isEndLineOfWrappedLine = viewModelMaxColumn - viewStatePosition . column === modelMaxColumn - modelStatePosition . column ;
101101
102102 if ( isEndOfViewLine || isEndLineOfWrappedLine ) {
103- return this . _moveToLineEndByModel ( viewModel , cursor , inSelectionMode ) ;
103+ return this . _moveToLineEndByModel ( viewModel , cursor , inSelectionMode , sticky ) ;
104104 } else {
105- return this . _moveToLineEndByView ( viewModel , cursor , inSelectionMode ) ;
105+ return this . _moveToLineEndByView ( viewModel , cursor , inSelectionMode , sticky ) ;
106106 }
107107 }
108108
109- private static _moveToLineEndByView ( viewModel : IViewModel , cursor : CursorState , inSelectionMode : boolean ) : PartialCursorState {
109+ private static _moveToLineEndByView ( viewModel : IViewModel , cursor : CursorState , inSelectionMode : boolean , sticky : boolean ) : PartialCursorState {
110110 return CursorState . fromViewState (
111- MoveOperations . moveToEndOfLine ( viewModel . cursorConfig , viewModel , cursor . viewState , inSelectionMode )
111+ MoveOperations . moveToEndOfLine ( viewModel . cursorConfig , viewModel , cursor . viewState , inSelectionMode , sticky )
112112 ) ;
113113 }
114114
115- private static _moveToLineEndByModel ( viewModel : IViewModel , cursor : CursorState , inSelectionMode : boolean ) : PartialCursorState {
115+ private static _moveToLineEndByModel ( viewModel : IViewModel , cursor : CursorState , inSelectionMode : boolean , sticky : boolean ) : PartialCursorState {
116116 return CursorState . fromModelState (
117- MoveOperations . moveToEndOfLine ( viewModel . cursorConfig , viewModel . model , cursor . modelState , inSelectionMode )
117+ MoveOperations . moveToEndOfLine ( viewModel . cursorConfig , viewModel . model , cursor . modelState , inSelectionMode , sticky )
118118 ) ;
119119 }
120120
0 commit comments