@@ -38,11 +38,7 @@ export class ArrowNavigation {
3838 workspace : WorkspaceSvg ,
3939 shortcut : ShortcutRegistry . KeyboardShortcut ,
4040 ) : boolean {
41- const cursor = workspace . getCursor ( ) ;
42- if ( ! cursor || ! cursor . getCurNode ( ) ) {
43- return false ;
44- }
45- const curNode = cursor . getCurNode ( ) ;
41+ const curNode = workspace . getCursor ( ) . getCurNode ( ) ;
4642 if ( curNode instanceof Field ) {
4743 return curNode . onShortcut ( shortcut ) ;
4844 }
@@ -70,7 +66,7 @@ export class ArrowNavigation {
7066 if (
7167 ! this . navigation . defaultWorkspaceCursorPositionIfNeeded ( workspace )
7268 ) {
73- workspace . getCursor ( ) ? .in ( ) ;
69+ workspace . getCursor ( ) . in ( ) ;
7470 }
7571 isHandled = true ;
7672 }
@@ -103,7 +99,7 @@ export class ArrowNavigation {
10399 if (
104100 ! this . navigation . defaultWorkspaceCursorPositionIfNeeded ( workspace )
105101 ) {
106- workspace . getCursor ( ) ? .out ( ) ;
102+ workspace . getCursor ( ) . out ( ) ;
107103 }
108104 isHandled = true ;
109105 }
@@ -169,7 +165,7 @@ export class ArrowNavigation {
169165 workspace ,
170166 )
171167 ) {
172- workspace . getCursor ( ) ? .next ( ) ;
168+ workspace . getCursor ( ) . next ( ) ;
173169 }
174170 isHandled = true ;
175171 }
@@ -182,7 +178,7 @@ export class ArrowNavigation {
182178 workspace . targetWorkspace ,
183179 )
184180 ) {
185- workspace . getCursor ( ) ? .next ( ) ;
181+ workspace . getCursor ( ) . next ( ) ;
186182 }
187183 isHandled = true ;
188184 }
@@ -232,7 +228,7 @@ export class ArrowNavigation {
232228 'last' ,
233229 )
234230 ) {
235- workspace . getCursor ( ) ? .prev ( ) ;
231+ workspace . getCursor ( ) . prev ( ) ;
236232 }
237233 isHandled = true ;
238234 }
@@ -246,7 +242,7 @@ export class ArrowNavigation {
246242 'last' ,
247243 )
248244 ) {
249- workspace . getCursor ( ) ? .prev ( ) ;
245+ workspace . getCursor ( ) . prev ( ) ;
250246 }
251247 isHandled = true ;
252248 }
0 commit comments