(cm)
| 4698 | // Make sure that at the end of the operation the current cursor is |
| 4699 | // shown. |
| 4700 | function ensureCursorVisible(cm) { |
| 4701 | resolveScrollToPos(cm); |
| 4702 | var cur = cm.getCursor(), from = cur, to = cur; |
| 4703 | if (!cm.options.lineWrapping) { |
| 4704 | from = cur.ch ? Pos(cur.line, cur.ch - 1) : cur; |
| 4705 | to = Pos(cur.line, cur.ch + 1); |
| 4706 | } |
| 4707 | cm.curOp.scrollToPos = {from: from, to: to, margin: cm.options.cursorScrollMargin, isCursor: true}; |
| 4708 | } |
| 4709 | |
| 4710 | // When an operation has its scrollToPos property set, and another |
| 4711 | // scroll action is applied before the end of the operation, this |
no test coverage detected