(handle, hidden)
| 1698 | }); |
| 1699 | } |
| 1700 | function setLineHidden(handle, hidden) { |
| 1701 | return changeLine(handle, function(line, no) { |
| 1702 | if (line.hidden != hidden) { |
| 1703 | line.hidden = hidden; |
| 1704 | if (!options.lineWrapping) { |
| 1705 | var l = line.text; |
| 1706 | if (hidden && l.length == maxLine.length) { |
| 1707 | maxLengthChanged = true; |
| 1708 | } |
| 1709 | else if (!hidden && l.length > maxLine.length) { |
| 1710 | maxLine = l; maxWidth = null; |
| 1711 | maxLengthChanged = false; |
| 1712 | } |
| 1713 | } |
| 1714 | updateLineHeight(line, hidden ? 0 : 1); |
| 1715 | var fline = sel.from.line, tline = sel.to.line; |
| 1716 | if (hidden && (fline == no || tline == no)) { |
| 1717 | var from = fline == no ? skipHidden({line: fline, ch: 0}, fline, 0) : sel.from; |
| 1718 | var to = tline == no ? skipHidden({line: tline, ch: 0}, tline, 0) : sel.to; |
| 1719 | // Can't hide the last visible line, we'd have no place to put the cursor |
| 1720 | if (!to) return; |
| 1721 | setSelection(from, to); |
| 1722 | } |
| 1723 | return (gutterDirty = true); |
| 1724 | } |
| 1725 | }); |
| 1726 | } |
| 1727 | |
| 1728 | function lineInfo(line) { |
| 1729 | if (typeof line == "number") { |
no test coverage detected