(cm)
| 2193 | // Poll for input changes, using the normal rate of polling. This |
| 2194 | // runs as long as the editor is focused. |
| 2195 | function slowPoll(cm) { |
| 2196 | if (cm.display.pollingFast) return; |
| 2197 | cm.display.poll.set(cm.options.pollInterval, function() { |
| 2198 | readInput(cm); |
| 2199 | if (cm.state.focused) slowPoll(cm); |
| 2200 | }); |
| 2201 | } |
| 2202 | |
| 2203 | // When an event has just come in that is likely to add or change |
| 2204 | // something in the input textarea, we poll faster, to ensure that |