diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2013-12-14 14:17:02 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2013-12-14 14:38:17 +0000 |
| commit | 6afef079b6104666e524dbae99592efc9c1b8136 (patch) | |
| tree | d6e95356477f478403b0ba8603b53b705a22cb37 /src/window.cc | |
| parent | eced7d4c246c007f9617d91edd5867e9e002bfc1 (diff) | |
Remove Editor::main_selection(|index), directly use the SelectionList method
Diffstat (limited to 'src/window.cc')
| -rw-r--r-- | src/window.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/window.cc b/src/window.cc index d63e6bf0..fc053bde 100644 --- a/src/window.cc +++ b/src/window.cc @@ -46,7 +46,7 @@ void Window::display_selection_at(LineCount line) { if (line >= 0 or line < m_dimensions.line) { - auto cursor_line = main_selection().last().line; + auto cursor_line = selections().main().last().line; m_position.line = std::max(0_line, cursor_line - line); } } @@ -147,8 +147,8 @@ static CharCount adapt_view_pos(const DisplayBuffer& display_buffer, void Window::scroll_to_keep_cursor_visible_ifn() { - const auto& first = main_selection().first(); - const auto& last = main_selection().last(); + const auto& first = selections().main().first(); + const auto& last = selections().main().last(); const LineCount offset = std::min<LineCount>(options()["scrolloff"].get<int>(), (m_dimensions.line - 1) / 2); |
