diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2013-03-20 19:05:05 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2013-03-20 19:11:58 +0100 |
| commit | d99fe87b43af1ecca7b61fbaba769aaed4475d03 (patch) | |
| tree | c342c7639083e7f56f49face4ba9ea2b4ad40f6f /src | |
| parent | 07a2c2944f10c77ef5c201803217718faea87df2 (diff) | |
Editor: fix select(Selection&, SelectMode::Replace)
Diffstat (limited to 'src')
| -rw-r--r-- | src/editor.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/editor.cc b/src/editor.cc index a3d012b6..2c32949e 100644 --- a/src/editor.cc +++ b/src/editor.cc @@ -241,7 +241,10 @@ void Editor::remove_selection(int index) void Editor::select(const Selection& selection, SelectMode mode) { if (mode == SelectMode::Replace) + { m_selections = SelectionList{ selection }; + m_main_sel = 0; + } else if (mode == SelectMode::Extend) { m_selections[m_main_sel].merge_with(selection); |
