remove useless Window::cursor_{position,iterator}
This commit is contained in:
parent
60fb523d62
commit
3c798a4ee8
|
@ -141,9 +141,6 @@ void draw_window(Window& window)
|
||||||
move(max_y, max_x - status_line.length());
|
move(max_y, max_x - status_line.length());
|
||||||
addstr(status_line.c_str());
|
addstr(status_line.c_str());
|
||||||
last_status_length = status_line.length();
|
last_status_length = status_line.length();
|
||||||
|
|
||||||
const DisplayCoord& cursor_position = window.cursor_position();
|
|
||||||
move(cursor_position.line, cursor_position.column);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static Key get_key()
|
static Key get_key()
|
||||||
|
|
|
@ -25,16 +25,6 @@ Window::Window(Buffer& buffer)
|
||||||
registry.add_highlighter_to_window(*this, "highlight_selections", HighlighterParameters());
|
registry.add_highlighter_to_window(*this, "highlight_selections", HighlighterParameters());
|
||||||
}
|
}
|
||||||
|
|
||||||
DisplayCoord Window::cursor_position() const
|
|
||||||
{
|
|
||||||
return line_and_column_at(cursor_iterator());
|
|
||||||
}
|
|
||||||
|
|
||||||
BufferIterator Window::cursor_iterator() const
|
|
||||||
{
|
|
||||||
return selections().back().last();
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename Iterator>
|
template<typename Iterator>
|
||||||
static DisplayCoord measure_string(Iterator begin, Iterator end)
|
static DisplayCoord measure_string(Iterator begin, Iterator end)
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,9 +25,6 @@ class Window : public Editor
|
||||||
public:
|
public:
|
||||||
const BufferCoord& position() const { return m_position; }
|
const BufferCoord& position() const { return m_position; }
|
||||||
|
|
||||||
DisplayCoord cursor_position() const;
|
|
||||||
BufferIterator cursor_iterator() const;
|
|
||||||
|
|
||||||
BufferIterator iterator_at(const DisplayCoord& window_pos) const;
|
BufferIterator iterator_at(const DisplayCoord& window_pos) const;
|
||||||
DisplayCoord line_and_column_at(const BufferIterator& iterator) const;
|
DisplayCoord line_and_column_at(const BufferIterator& iterator) const;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user