(cm, pos)
| 125 | cmds.insertLineBefore = function(cm) { return insertLine(cm, true); }; |
| 126 | |
| 127 | function wordAt(cm, pos) { |
| 128 | var start = pos.ch, end = start, line = cm.getLine(pos.line); |
| 129 | while (start && CodeMirror.isWordChar(line.charAt(start - 1))) --start; |
| 130 | while (end < line.length && CodeMirror.isWordChar(line.charAt(end))) ++end; |
| 131 | return {from: Pos(pos.line, start), to: Pos(pos.line, end), word: line.slice(start, end)}; |
| 132 | } |
| 133 | |
| 134 | cmds.selectNextOccurrence = function(cm) { |
| 135 | var from = cm.getCursor("from"), to = cm.getCursor("to"); |
no test coverage detected