diff --git a/src/input_handler.cc b/src/input_handler.cc index 666a36cf..63c69eed 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -41,7 +41,8 @@ public: virtual std::pair get_cursor_info() const { - DisplayCoord coord = *context().window().display_position(context().selections().main().cursor()); + const auto cursor = context().selections().main().cursor(); + auto coord = context().window().display_position(cursor).value_or(DisplayCoord{}); return {CursorMode::Buffer, coord}; }