remove unused measure_string from window.cc
This commit is contained in:
parent
63d1c4471c
commit
f43d206e4e
|
@ -25,29 +25,6 @@ Window::Window(Buffer& buffer)
|
||||||
registry.add_highlighter_to_window(*this, "highlight_selections", HighlighterParameters());
|
registry.add_highlighter_to_window(*this, "highlight_selections", HighlighterParameters());
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename Iterator>
|
|
||||||
static DisplayCoord measure_string(Iterator begin, Iterator end)
|
|
||||||
{
|
|
||||||
DisplayCoord result(0, 0);
|
|
||||||
while (begin != end)
|
|
||||||
{
|
|
||||||
if (*begin == '\n')
|
|
||||||
{
|
|
||||||
++result.line;
|
|
||||||
result.column = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
++result.column;
|
|
||||||
++begin;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
static DisplayCoord measure_string(const String& string)
|
|
||||||
{
|
|
||||||
return measure_string(string.begin(), string.end());
|
|
||||||
}
|
|
||||||
|
|
||||||
BufferIterator Window::iterator_at(const DisplayCoord& window_pos) const
|
BufferIterator Window::iterator_at(const DisplayCoord& window_pos) const
|
||||||
{
|
{
|
||||||
if (m_display_buffer.begin() == m_display_buffer.end())
|
if (m_display_buffer.begin() == m_display_buffer.end())
|
||||||
|
|
Loading…
Reference in New Issue
Block a user