Lines Matching refs:match
27 const match = { variable
36 this.matches.push(match); // Global list of matches
37 this.newMatches.push(match); // Only new matches
70 for (let match of this.newMatches) {
71 const top = editor.getLineRect(match.startline).top;
72 const bottom = editor.getLineRect(match.endline).bottom;
73 match.scroll = {top:top, bottom:bottom};
95 for (let match of this.matches)
96 if (match.startline >= change.index.keeplast) {
98 match.startline += change.shift;
99 match.endline += change.shift;
101 if (match.scroll !== null) {
103 shift = editor.getLineRect(match.startline).top - match.scroll.top;
104 match.scroll.top += shift;
105 match.scroll.bottom += shift;
114 for (let match of this.matches)
115 if (!this.collides(match, startline, endline))
116 keep.push(match);
118 moaiEditor.editor.current.removeMatches(match.startline, match.endline);
122 collides(match, start, end) { argument
123 if (match.startline >= start && match.startline <= end)
125 if (match.endline >= start && match.endline <= end)
127 if (start >= match.startline && start <= match.endline)
129 if (end >= match.startline && end <= match.endline)
135 for (let match of this.matches)
136 if (match.handle == handle)
137 return match;
148 for (let match of this.matches) {
149 if ( range !== null && !this.collides(match, range.from, range.to) )
151 const top = editor.getLineRect(match.startline).top;
152 const bottom = editor.getLineRect(match.endline).bottom;
153 match.scroll = {top:top, bottom:bottom};
164 for (let match of this.matches) {
165 const top = editor.getLineRect(match.startline).top;
166 const bottom = editor.getLineRect(match.endline).bottom;
168 element.style.top = match.scroll.top+'px';
169 element.style.height = (match.scroll.bottom - match.scroll.top)+'px';