clipboard: cleanup valid_yank_reg and use it for :redir

This fixes missing clipboard support for `:redir`

Helped-By: Michael Reed <m.reed@mykolab.com>
Helped-By: Scott Prager <splinterofchaos@gmail.com>
This commit is contained in:
Björn Linse
2015-04-12 22:13:45 +02:00
parent edb13791bd
commit 26fedb133d
5 changed files with 43 additions and 22 deletions

View File

@@ -6738,8 +6738,7 @@ static void ex_redir(exarg_T *eap)
/* redirect to a register a-z (resp. A-Z for appending) */
close_redir();
++arg;
if (ASCII_ISALPHA(*arg)
|| *arg == '"') {
if (valid_yank_reg(*arg, true) && *arg != '_') {
redir_reg = *arg++;
if (*arg == '>' && arg[1] == '>') /* append */
arg += 2;