Skip to content

Commit f475c9f

Browse files
committed
updated for version 7.3.508
Problem: Default for v:register is not set. Solution: Init v:register in eval_init(). Correct for 'clipboard' before the main loop. (Ingo Karkat)
1 parent 7243716 commit f475c9f

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

src/eval.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -880,6 +880,7 @@ eval_init()
880880
hash_add(&compat_hashtab, p->vv_di.di_key);
881881
}
882882
set_vim_var_nr(VV_SEARCHFORWARD, 1L);
883+
set_reg_var(0); /* default for v:register is not 0 but '"' */
883884

884885
#ifdef EBCDIC
885886
/*

src/main.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -928,6 +928,18 @@ int vim_main2(int argc, char **argv)
928928
TIME_MSG("VimEnter autocommands");
929929
#endif
930930

931+
#if defined(FEAT_EVAL) && defined(FEAT_CLIPBOARD)
932+
/* Adjust default register name for "unnamed" in 'clipboard'. Can only be
933+
* done after the clipboard is available and all initial commands that may
934+
* modify the 'clipboard' setting have run; i.e. just before entering the
935+
* main loop. */
936+
{
937+
int default_regname = 0;
938+
adjust_clip_reg(&default_regname);
939+
set_reg_var(default_regname);
940+
}
941+
#endif
942+
931943
#if defined(FEAT_DIFF) && defined(FEAT_SCROLLBIND)
932944
/* When a startup script or session file setup for diff'ing and
933945
* scrollbind, sync the scrollbind now. */
@@ -1357,7 +1369,7 @@ getout(exitval)
13571369
{
13581370
apply_autocmds(EVENT_BUFWINLEAVE, buf->b_fname,
13591371
buf->b_fname, FALSE, buf);
1360-
buf->b_changedtick = -1; /* note that we did it already */
1372+
buf->b_changedtick = -1; /* note that we did it already */
13611373
/* start all over, autocommands may mess up the lists */
13621374
next_tp = first_tabpage;
13631375
break;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,8 @@ static char *(features[]) =
714714

715715
static int included_patches[] =
716716
{ /* Add new patch number below this line */
717+
/**/
718+
508,
717719
/**/
718720
507,
719721
/**/

0 commit comments

Comments
 (0)