diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-01-14 21:56:43 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-01-14 21:56:43 +0100 |
| commit | 761b5485d2e4e20d65c561e9edfa3bf978e4a2a5 (patch) | |
| tree | 6e5527862a72c67799aee4c67dd9681840580f54 /vis.c | |
| parent | f5a693ee28131bfbe363daa43a2af557f9448da7 (diff) | |
| download | vis-761b5485d2e4e20d65c561e9edfa3bf978e4a2a5.tar.gz vis-761b5485d2e4e20d65c561e9edfa3bf978e4a2a5.tar.xz | |
vis: use different default register when editing a prompt file
Diffstat (limited to 'vis.c')
| -rw-r--r-- | vis.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -425,9 +425,9 @@ void action_do(Vis *vis, Action *a) { next = view_cursors_next(cursor); size_t pos = view_cursors_pos(cursor); - Register *reg = a->reg ? a->reg : &vis->registers[VIS_REG_DEFAULT]; - if (multiple_cursors) - reg = view_cursors_register(cursor); + Register *reg = multiple_cursors ? view_cursors_register(cursor) : a->reg; + if (!reg) + reg = &vis->registers[win->file->internal ? VIS_REG_PROMPT : VIS_REG_DEFAULT]; OperatorContext c = { .count = a->count, |
