diff --git a/src/insert_completer.cc b/src/insert_completer.cc index 9d9bc7cd..45f9681f 100644 --- a/src/insert_completer.cc +++ b/src/insert_completer.cc @@ -295,8 +295,8 @@ void InsertCompleter::update() ByteCoord cursor = m_context.selections().main().cursor(); ByteCoord compl_beg = m_completions.begin; if (cursor.line == compl_beg.line and - is_in_range(cursor.column, compl_beg.column, - compl_beg.column + longest_completion-1)) + compl_beg.column <= cursor.column and + cursor.column < compl_beg.column + longest_completion) { String prefix = m_context.buffer().string(compl_beg, cursor); diff --git a/src/utils.hh b/src/utils.hh index c441cdf3..d8c6c994 100644 --- a/src/utils.hh +++ b/src/utils.hh @@ -132,12 +132,6 @@ const T& clamp(const T& val, const T& min, const T& max) return (val < min ? min : (val > max ? max : val)); } -template -bool is_in_range(const T& val, const T& min, const T& max) -{ - return min <= val and val <= max; -} - } #endif // utils_hh_INCLUDED