aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2017-03-18 19:33:25 +0100
committerJustin M. Keyes <justinkz@gmail.com>2017-03-18 19:33:25 +0100
commit6a68a922b829866634c3758b1ef612f61c56ca6c (patch)
tree12588ff37b0b8806a219090abadfde78ca670f2f /src
parentbdcb2a38b3667c01efada0c6ed9414426f1c0468 (diff)
downloadrneovim-6a68a922b829866634c3758b1ef612f61c56ca6c.tar.gz
rneovim-6a68a922b829866634c3758b1ef612f61c56ca6c.tar.bz2
rneovim-6a68a922b829866634c3758b1ef612f61c56ca6c.zip
clipboard: set v:register after startup (#5708)
Fixes #5697
Diffstat (limited to 'src')
-rw-r--r--src/nvim/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c
index d7baa7acfa..4416bd067c 100644
--- a/src/nvim/main.c
+++ b/src/nvim/main.c
@@ -513,6 +513,12 @@ int main(int argc, char **argv)
apply_autocmds(EVENT_VIMENTER, NULL, NULL, false, curbuf);
TIME_MSG("VimEnter autocommands");
+ // Adjust default register name for "unnamed" in 'clipboard'. Can only be
+ // done after the clipboard is available and all initial commands that may
+ // modify the 'clipboard' setting have run; i.e. just before entering the
+ // main loop.
+ set_reg_var(get_default_register_name());
+
/* When a startup script or session file setup for diff'ing and
* scrollbind, sync the scrollbind now. */
if (curwin->w_p_diff && curwin->w_p_scb) {