From 2aaae7473cb457d5c108536cf8539e11f6297ec9 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 19 Sep 2014 13:45:24 +0100 Subject: [PATCH] preserve selection direction in split lines --- src/normal.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/normal.cc b/src/normal.cc index 6c7aab4c..af85b61f 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -668,10 +668,10 @@ void split_lines(Context& context, int) } auto min = sel.min(); auto max = sel.max(); - res.push_back({min, {min.line, buffer[min.line].length()-1}}); + res.push_back(keep_direction({min, {min.line, buffer[min.line].length()-1}}, sel)); for (auto line = min.line+1; line < max.line; ++line) - res.push_back({line, {line, buffer[line].length()-1}}); - res.push_back({max.line, max}); + res.push_back(keep_direction({line, {line, buffer[line].length()-1}}, sel)); + res.push_back(keep_direction({max.line, max}, sel)); } selections = std::move(res); }