( runtime: BufferNavigationRuntime, delta: 1 | -1 )
| 73 | } |
| 74 | |
| 75 | export function navigateActiveBuffer( |
| 76 | runtime: BufferNavigationRuntime, |
| 77 | delta: 1 | -1 |
| 78 | ): void { |
| 79 | const target = getBufferNavigationTarget( |
| 80 | runtime.paneLayout, |
| 81 | runtime.activePaneId, |
| 82 | runtime.notes, |
| 83 | delta |
| 84 | ) |
| 85 | |
| 86 | if (target.kind === 'focus') { |
| 87 | void runtime.focusTabInPane(target.paneId, target.path) |
| 88 | return |
| 89 | } |
| 90 | if (target.kind === 'open') { |
| 91 | void runtime.openNoteInPane(target.paneId, target.path) |
| 92 | return |
| 93 | } |
| 94 | if (target.kind === 'create-quick') { |
| 95 | void runtime.createAndOpen('quick', '', { focusTitle: true }) |
| 96 | } |
| 97 | } |
no test coverage detected