summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2015-11-26 13:32:29 +0000
committerMaxime Coste <frrrwww@gmail.com>2015-11-26 13:34:46 +0000
commit9e08cf8ea4d10aa13b90ef05a80367d0165bffe3 (patch)
tree761ed8d786c108c4eb1c8d4cfe3c842e443bc1c8 /src
parent001da44e11dcea58fbeb545aa256cb930ea7e857 (diff)
Preserve default registers in exec/eval by default
Diffstat (limited to 'src')
-rw-r--r--src/commands.cc10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/commands.cc b/src/commands.cc
index ddaee769..ab19ef8e 100644
--- a/src/commands.cc
+++ b/src/commands.cc
@@ -1266,11 +1266,8 @@ void context_wrap(const ParametersParser& parser, Context& context, Func func)
const bool disable_keymaps = not parser.get_switch("with-maps");
Vector<RegisterRestorer> saved_registers;
- if (auto regs = parser.get_switch("save-regs"))
- {
- for (auto& r : *regs)
- saved_registers.emplace_back(r, context);
- }
+ for (auto& r : parser.get_switch("save-regs").value_or("/\"|^@"))
+ saved_registers.emplace_back(r, context);
ClientManager& cm = ClientManager::instance();
if (auto bufnames = parser.get_switch("buffer"))
@@ -1699,9 +1696,6 @@ const CommandDesc change_working_directory_cmd = {
void exec_keys(ConstArrayView<Key> keys, Context& context)
{
- RegisterRestorer quote('"', context);
- RegisterRestorer slash('/', context);
-
ScopedEdition edition(context);
for (auto& key : keys)