summaryrefslogtreecommitdiff
path: root/src/window.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2011-09-17 14:28:23 +0000
committerMaxime Coste <frrrwww@gmail.com>2011-09-17 14:28:23 +0000
commit0513b4de29114fbeb661e39f52fdb68540bdb024 (patch)
tree6bbd540fc05982564c135f61f40472f110f98e67 /src/window.cc
parent34c9b0d30fe157b52b302a71e2ef73ceba86fab0 (diff)
Shift-{H,J,K,L} keys move cursor while selecting.
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));