summaryrefslogtreecommitdiff
path: root/src/input_handler.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2013-12-14 14:17:02 +0000
committerMaxime Coste <frrrwww@gmail.com>2013-12-14 14:38:17 +0000
commit6afef079b6104666e524dbae99592efc9c1b8136 (patch)
treed6e95356477f478403b0ba8603b53b705a22cb37 /src/input_handler.cc
parenteced7d4c246c007f9617d91edd5867e9e002bfc1 (diff)
Remove Editor::main_selection(|index), directly use the SelectionList method
Diffstat (limited to 'src/input_handler.cc')
-rw-r--r--src/input_handler.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/input_handler.cc b/src/input_handler.cc
index dea75944..79501e59 100644
--- a/src/input_handler.cc
+++ b/src/input_handler.cc
@@ -590,7 +590,7 @@ public:
if (m_current_candidate < 0)
m_current_candidate += m_matching_candidates.size();
const String& candidate = m_matching_candidates[m_current_candidate];
- const auto& cursor_pos = m_context.editor().main_selection().last();
+ const auto& cursor_pos = m_context.editor().selections().main().last();
const auto prefix_len = buffer.distance(m_completions.begin, cursor_pos);
const auto suffix_len = std::max(0_byte, buffer.distance(cursor_pos, m_completions.end));
const auto buffer_len = buffer.byte_count();
@@ -628,7 +628,7 @@ public:
for (auto& candidate : m_completions.candidates)
longest_completion = std::max(longest_completion, candidate.length());
- BufferCoord cursor = m_context.editor().main_selection().last();
+ BufferCoord cursor = m_context.editor().selections().main().last();
BufferCoord compl_beg = m_completions.begin;
if (cursor.line == compl_beg.line and
is_in_range(cursor.column - compl_beg.column,
@@ -672,7 +672,7 @@ public:
bool try_complete()
{
auto& buffer = m_context.buffer();
- BufferCoord cursor_pos = m_context.editor().main_selection().last();
+ BufferCoord cursor_pos = m_context.editor().selections().main().last();
m_completions = (this->*complete_func)(buffer, cursor_pos);
if (not m_completions.is_valid())
return false;