(cm, curStart, curEnd)
| 1508 | // 'dw' should word, but not the newline, while 'w' should advance the |
| 1509 | // caret to the first character of the next line. |
| 1510 | function clipToLine(cm, curStart, curEnd) { |
| 1511 | var selection = cm.getRange(curStart, curEnd); |
| 1512 | var lines = selection.split('\n'); |
| 1513 | if (lines.length > 1 && isWhiteSpaceString(lines.pop())) { |
| 1514 | curEnd.line--; |
| 1515 | curEnd.ch = lineLength(cm, curEnd.line); |
| 1516 | } |
| 1517 | } |
| 1518 | |
| 1519 | // Expand the selection to line ends. |
| 1520 | function expandSelectionToLine(cm, curStart, curEnd) { |
no test coverage detected