@@ -6,6 +6,10 @@ import { getLine } from "./blocks.js"
6
6
7
7
import { Point , TextEditor } from "atom"
8
8
9
+ /**
10
+ * @param {TextEditor } editor
11
+ * @returns {[Point, Point] }
12
+ */
9
13
export function getRange ( editor : TextEditor ) : [ Point , Point ] {
10
14
// Cell range is:
11
15
// Start of line below top delimiter (and/or start of top row of file) to
@@ -48,6 +52,9 @@ export function getRange(editor: TextEditor): [Point, Point] {
48
52
return [ start , end ]
49
53
}
50
54
55
+ /**
56
+ * @param {TextEditor } editor
57
+ */
51
58
export function get ( editor : TextEditor ) {
52
59
if ( editor . getGrammar ( ) . scopeName . indexOf ( "source.julia" ) > - 1 ) {
53
60
return jlGet ( editor )
@@ -56,6 +63,9 @@ export function get(editor: TextEditor) {
56
63
}
57
64
}
58
65
66
+ /**
67
+ * @param {TextEditor } editor
68
+ */
59
69
function jlGet ( editor : TextEditor ) {
60
70
const range = getRange ( editor )
61
71
let text = editor . getTextInBufferRange ( range )
@@ -72,6 +82,9 @@ function jlGet(editor: TextEditor) {
72
82
return [ res ]
73
83
}
74
84
85
+ /**
86
+ * @param {TextEditor | null | undefined } editor
87
+ */
75
88
export function moveNext ( editor : TextEditor | null | undefined ) {
76
89
if ( ! editor ) {
77
90
editor = atom . workspace . getActiveTextEditor ( )
@@ -88,6 +101,9 @@ export function moveNext(editor: TextEditor | null | undefined) {
88
101
}
89
102
}
90
103
104
+ /**
105
+ * @param {TextEditor } editor
106
+ */
91
107
function jlMoveNext ( editor : TextEditor ) {
92
108
const range = getRange ( editor )
93
109
const sel = editor . getSelections ( ) [ 0 ]
@@ -98,6 +114,9 @@ function jlMoveNext(editor: TextEditor) {
98
114
] )
99
115
}
100
116
117
+ /**
118
+ * @param {TextEditor | undefined | null } editor
119
+ */
101
120
export function movePrev ( editor : TextEditor | undefined | null ) {
102
121
if ( ! editor ) {
103
122
editor = atom . workspace . getActiveTextEditor ( )
@@ -113,6 +132,9 @@ export function movePrev(editor: TextEditor | undefined | null) {
113
132
}
114
133
}
115
134
135
+ /**
136
+ * @param {TextEditor } editor
137
+ */
116
138
function jlMovePrev ( editor : TextEditor ) {
117
139
const range = getRange ( editor )
118
140
const prevRow = range [ 0 ] . row - 2 // 2 = 1 to get to delimiter line + 1 more to go past it
0 commit comments