Expose last entered command in register :

This commit is contained in:
Dan Rosén 2017-05-25 21:39:05 +02:00
parent 55d1d1020d
commit b1735ae76e
3 changed files with 4 additions and 2 deletions

View File

@ -149,7 +149,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

@ -171,7 +171,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

@ -451,6 +451,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} }