(pos)
| 1499 | } |
| 1500 | |
| 1501 | function selectWordAt(pos) { |
| 1502 | var line = getLine(pos.line).text; |
| 1503 | var start = pos.ch, end = pos.ch; |
| 1504 | while (start > 0 && isWordChar(line.charAt(start - 1))) --start; |
| 1505 | while (end < line.length && isWordChar(line.charAt(end))) ++end; |
| 1506 | setSelectionUser({line: pos.line, ch: start}, {line: pos.line, ch: end}); |
| 1507 | } |
| 1508 | function selectLine(line) { |
| 1509 | setSelectionUser({line: line, ch: 0}, clipPos({line: line + 1, ch: 0})); |
| 1510 | } |
no test coverage detected