From fba1d3b50f34a4e755bee8fa5dcc192efef202d8 Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Fri, 27 Jun 2014 16:13:28 -0300 Subject: provider: Add support for clipboard registers. This reimplements the '+'/'*' clipboard registers(both are aliases to the same register, no dedicated storage for the X11 selection) on top of the provider infrastructure. This adds two new 'unnamedclip' option, has the same effect of setting 'clipboard' to 'unnamed/unnamedplus' in vim The 'clipboard' option was not reused because all values(except 'unnamedplus') seem to be useless for Neovim, and the code to parse the option was relatively big. The option remains for vim compatibility but it's silently ignored. --- src/nvim/option.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/nvim/option.c') diff --git a/src/nvim/option.c b/src/nvim/option.c index 5b3f0d5612..28bbfb41e7 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -963,6 +963,9 @@ static struct vimoption {"infercase", "inf", P_BOOL|P_VI_DEF, (char_u *)&p_inf, PV_INF, {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"initclipboard","icpb",P_STRING|P_VI_DEF|P_SECURE, + (char_u *)&p_icpb, PV_NONE, + {(char_u *)NULL, (char_u *)0L} SCRIPTID_INIT}, {"initpython","ipy",P_STRING|P_VI_DEF|P_SECURE, (char_u *)&p_ipy, PV_NONE, {(char_u *)NULL, (char_u *)0L} SCRIPTID_INIT}, @@ -1628,6 +1631,9 @@ static struct vimoption {"undoreload", "ur", P_NUM|P_VI_DEF, (char_u *)&p_ur, PV_NONE, { (char_u *)10000L, (char_u *)0L} SCRIPTID_INIT}, + {"unnamedclip", "ucp", P_BOOL|P_VI_DEF|P_VIM, + (char_u *)&p_unc, PV_NONE, + {(char_u *)FALSE, (char_u *)FALSE} SCRIPTID_INIT}, {"updatecount", "uc", P_NUM|P_VI_DEF, (char_u *)&p_uc, PV_NONE, {(char_u *)200L, (char_u *)0L} SCRIPTID_INIT}, -- cgit