From 3c798a4ee84238caa7df847f3d8cf31bf6b16fb0 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 21 Mar 2012 19:26:42 +0000 Subject: [PATCH] remove useless Window::cursor_{position,iterator} --- src/ncurses.cc | 3 --- src/window.cc | 10 ---------- src/window.hh | 3 --- 3 files changed, 16 deletions(-) diff --git a/src/ncurses.cc b/src/ncurses.cc index becb8efe..9f7f9b5e 100644 --- a/src/ncurses.cc +++ b/src/ncurses.cc @@ -141,9 +141,6 @@ void draw_window(Window& window) move(max_y, max_x - status_line.length()); addstr(status_line.c_str()); last_status_length = status_line.length(); - - const DisplayCoord& cursor_position = window.cursor_position(); - move(cursor_position.line, cursor_position.column); } static Key get_key() diff --git a/src/window.cc b/src/window.cc index a9eab6d7..47e6d9a6 100644 --- a/src/window.cc +++ b/src/window.cc @@ -25,16 +25,6 @@ Window::Window(Buffer& buffer) 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 static DisplayCoord measure_string(Iterator begin, Iterator end) { diff --git a/src/window.hh b/src/window.hh index e78a7791..0d7b924c 100644 --- a/src/window.hh +++ b/src/window.hh @@ -25,9 +25,6 @@ class Window : public Editor public: const BufferCoord& position() const { return m_position; } - DisplayCoord cursor_position() const; - BufferIterator cursor_iterator() const; - BufferIterator iterator_at(const DisplayCoord& window_pos) const; DisplayCoord line_and_column_at(const BufferIterator& iterator) const;