summaryrefslogtreecommitdiff
path: root/src/normal.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2014-07-02 23:58:58 +0100
committerMaxime Coste <frrrwww@gmail.com>2014-07-05 12:10:06 +0100
commit8795efdf19ad72d85b2cdc1ec1db447178520b74 (patch)
treea1884a057aec14d07b1975ca5d66022189312ad9 /src/normal.cc
parent12ecffd36183fe182e2a496f1dd6d8be1fc7c7a9 (diff)
Minor style cleanup
Diffstat (limited to 'src/normal.cc')
-rw-r--r--src/normal.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/normal.cc b/src/normal.cc
index 5c073220..5aaa79ae 100644
--- a/src/normal.cc
+++ b/src/normal.cc
@@ -497,18 +497,17 @@ template<InsertMode mode>
void paste(Context& context, int)
{
auto strings = RegisterManager::instance()['"'].values(context);
- bool linewise = false;
+ InsertMode effective_mode = mode;
for (auto& str : strings)
{
if (not str.empty() and str.back() == '\n')
{
- linewise = true;
+ effective_mode = adapt_for_linewise(mode);
break;
}
}
ScopedEdition edition(context);
- context.selections().insert(strings,
- linewise ? adapt_for_linewise(mode) : mode);
+ context.selections().insert(strings, effective_mode);
}
template<typename T>