Merge remote-tracking branch 'danr/Expose-last-entered-command-in-register'

This commit is contained in:
Maxime Coste 2017-06-29 07:29:32 +01:00
commit 9bbab690ba
3 changed files with 4 additions and 2 deletions

View File

@ -151,7 +151,8 @@ constexpr StringView register_doc =
" * @: default macro register\n"
" * /: default search register\n"
" * ^: default mark register\n"
" * |: default shell command register\n";
" * |: default shell command register\n"
" * :: last entered command\n";
class Normal : public InputMode
{

View File

@ -181,7 +181,7 @@ void register_registers()
{
RegisterManager& register_manager = RegisterManager::instance();
for (auto c : "abcdefghijklmnopqrstuvwxyz/\"|^@")
for (auto c : "abcdefghijklmnopqrstuvwxyz/\"|^@:")
register_manager.add_register(c, make_unique<StaticRegister>());
using StringList = Vector<String, MemoryDomain::Registers>;

View File

@ -450,6 +450,7 @@ void command(Context& context, NormalParams params)
}
if (event == PromptEvent::Validate)
{
RegisterManager::instance()[':'].set(context, cmdline.str());
EnvVarMap env_vars = {
{ "count", to_string(params.count) },
{ "register", String{&params.reg, 1} }