From 9fcb89c8fc05f3015e55b6a14309355a7ab187af Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 2 Aug 2012 07:04:42 +0200 Subject: [PATCH] Window: tolerate invisible cursor when it is the end of the buffer --- src/window.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/window.cc b/src/window.cc index 794e073f..fad8859e 100644 --- a/src/window.cc +++ b/src/window.cc @@ -118,8 +118,11 @@ void Window::scroll_to_keep_cursor_visible_ifn() } column += atom.content.content().length(); } - // the cursor should always be visible. - assert(false); + if (cursor != buffer().end()) + { + // the cursor should always be visible. + assert(false); + } } String Window::status_line() const