(cm)
| 3562 | // Make sure that at the end of the operation the current cursor is |
| 3563 | // shown. |
| 3564 | function ensureCursorVisible(cm) { |
| 3565 | resolveScrollToPos(cm); |
| 3566 | var cur = cm.getCursor(), from = cur, to = cur; |
| 3567 | if (!cm.options.lineWrapping) { |
| 3568 | from = cur.ch ? Pos(cur.line, cur.ch - 1) : cur; |
| 3569 | to = Pos(cur.line, cur.ch + 1); |
| 3570 | } |
| 3571 | cm.curOp.scrollToPos = {from: from, to: to, margin: cm.options.cursorScrollMargin, isCursor: true}; |
| 3572 | } |
| 3573 | |
| 3574 | // When an operation has its scrollToPos property set, and another |
| 3575 | // scroll action is applied before the end of the operation, this |
no test coverage detected