summaryrefslogtreecommitdiff
path: root/src/window.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/window.cc')
-rw-r--r--src/window.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/window.cc b/src/window.cc
index 926258b9..feb379d8 100644
--- a/src/window.cc
+++ b/src/window.cc
@@ -137,9 +137,7 @@ void Window::select(bool append, const Selector& selector)
void Window::move_cursor(const WindowCoord& offset)
{
- BufferCoord target_position =
- window_to_buffer(WindowCoord(m_cursor.line + offset.line,
- m_cursor.column + offset.column));
+ BufferCoord target_position = window_to_buffer(m_cursor + offset);
m_cursor = buffer_to_window(m_buffer.clamp(target_position));