MoveLinesDown moves the range of lines down one row
(start int, end int)
| 1152 | |
| 1153 | // MoveLinesDown moves the range of lines down one row |
| 1154 | func (b *Buffer) MoveLinesDown(start int, end int) { |
| 1155 | if start < 0 || start >= end || end >= len(b.lines) { |
| 1156 | return |
| 1157 | } |
| 1158 | l := string(b.LineBytes(end)) |
| 1159 | b.Insert( |
| 1160 | Loc{0, start}, |
| 1161 | l+"\n", |
| 1162 | ) |
| 1163 | end++ |
| 1164 | b.Remove( |
| 1165 | Loc{0, end}, |
| 1166 | Loc{0, end + 1}, |
| 1167 | ) |
| 1168 | } |
| 1169 | |
| 1170 | var BracePairs = [][2]rune{ |
| 1171 | {'(', ')'}, |