diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2012-08-02 07:04:42 +0200 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2012-08-02 07:04:42 +0200 |
| commit | 9fcb89c8fc05f3015e55b6a14309355a7ab187af (patch) | |
| tree | 07070051444be7e488477813f360e3c0fd0292c9 /src | |
| parent | 23f72851e46961c97be930f33f2c747d2d26fb05 (diff) | |
Window: tolerate invisible cursor when it is the end of the buffer
Diffstat (limited to 'src')
| -rw-r--r-- | src/window.cc | 7 |
1 files 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 |
