selectRegionUpdate updates current select region based on given cursor position relative to SelectStart position
(pos lexer.Pos)
| 169 | // selectRegionUpdate updates current select region based on given cursor position |
| 170 | // relative to SelectStart position |
| 171 | func (ed *Editor) selectRegionUpdate(pos lexer.Pos) { |
| 172 | if pos.IsLess(ed.selectStart) { |
| 173 | ed.SelectRegion.Start = pos |
| 174 | ed.SelectRegion.End = ed.selectStart |
| 175 | } else { |
| 176 | ed.SelectRegion.Start = ed.selectStart |
| 177 | ed.SelectRegion.End = pos |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | // cursorSelect updates selection based on cursor movements, given starting |
| 182 | // cursor position and ed.CursorPos is current |
no test coverage detected