(cm)
| 2179 | // Poll for input changes, using the normal rate of polling. This |
| 2180 | // runs as long as the editor is focused. |
| 2181 | function slowPoll(cm) { |
| 2182 | if (cm.display.pollingFast) return; |
| 2183 | cm.display.poll.set(cm.options.pollInterval, function() { |
| 2184 | readInput(cm); |
| 2185 | if (cm.state.focused) slowPoll(cm); |
| 2186 | }); |
| 2187 | } |
| 2188 | |
| 2189 | // When an event has just come in that is likely to add or change |
| 2190 | // something in the input textarea, we poll faster, to ensure that |