summaryrefslogtreecommitdiff
path: root/src/selection.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2017-01-13 00:17:31 +0000
committerMaxime Coste <mawww@kakoune.org>2017-01-13 00:17:31 +0000
commit4916ea17661492da1af08eebb7fabd662c7e8390 (patch)
tree9019ba30758287f6b5821092640b949ce4b2e7ce /src/selection.hh
parentb157a481e142d32813af238c18d96d3d40254538 (diff)
Fix capture group handling
Fixes #1129
Diffstat (limited to 'src/selection.hh')
-rw-r--r--src/selection.hh8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/selection.hh b/src/selection.hh
index fa0da47a..7772f72c 100644
--- a/src/selection.hh
+++ b/src/selection.hh
@@ -28,6 +28,14 @@ struct Selection
const BufferCoord& anchor() const { return m_anchor; }
const BufferCoordAndTarget& cursor() const { return m_cursor; }
+ void set(BufferCoord anchor, BufferCoord cursor)
+ {
+ m_anchor = anchor;
+ m_cursor = cursor;
+ }
+
+ void set(BufferCoord coord) { set(coord, coord); }
+
CaptureList& captures() { return m_captures; }
const CaptureList& captures() const { return m_captures; }