diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/nvim/ex_cmds.c | 12 | ||||
| -rw-r--r-- | src/nvim/getchar.c | 6 | ||||
| -rw-r--r-- | src/nvim/normal.c | 6 | ||||
| -rw-r--r-- | src/nvim/popupmnu.c | 2 | ||||
| -rw-r--r-- | src/nvim/version.c | 8 | 
5 files changed, 24 insertions, 10 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index b72d1941ec..163d20f13a 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -1648,11 +1648,13 @@ void write_viminfo(char_u *file, int forceit)    if (fp_in != NULL) {      fclose(fp_in); -    /* -     * In case of an error keep the original viminfo file. -     * Otherwise rename the newly written file. -     */ -    if (viminfo_errcnt || vim_rename(tempname, fname) == -1) { +    /* In case of an error keep the original viminfo file. Otherwise +     * rename the newly written file. Give an error if that fails. */ +    if (viminfo_errcnt == 0 && vim_rename(tempname, fname) == -1) { +      viminfo_errcnt++; +      EMSG2(_("E886: Can't rename viminfo file to %s!"), fname); +    } +    if (viminfo_errcnt > 0) {        os_remove((char *)tempname);      }    } diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index 0d61172d69..c3f6e2c2b6 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -2209,6 +2209,12 @@ static int vgetorpeek(int advance)          }          if (c < 0)            continue;             /* end of input script reached */ + +        // Allow mapping for just typed characters. When we get here c +        // is the number of extra bytes and typebuf.tb_len is 1. +        for (n = 1; n <= c; n++) { +          typebuf.tb_noremap[typebuf.tb_off + n] = RM_YES; +        }          typebuf.tb_len += c;          /* buffer full, don't map */ diff --git a/src/nvim/normal.c b/src/nvim/normal.c index cc82630548..391828da28 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -845,7 +845,10 @@ getcount:        /* When getting a text character and the next character is a         * multi-byte character, it could be a composing character. -       * However, don't wait for it to arrive. */ +       * However, don't wait for it to arrive. Also, do enable mapping, +       * because if it's put back with vungetc() it's too late to apply +       * mapping. */ +      no_mapping--;        while (enc_utf8 && lang && (c = vpeekc()) > 0               && (c >= 0x100 || MB_BYTE2LEN(vpeekc()) > 1)) {          c = plain_vgetc(); @@ -857,6 +860,7 @@ getcount:          else            ca.ncharC2 = c;        } +      no_mapping++;      }      --no_mapping;      --allow_keys; diff --git a/src/nvim/popupmnu.c b/src/nvim/popupmnu.c index f4e60ddde9..19b92c5789 100644 --- a/src/nvim/popupmnu.c +++ b/src/nvim/popupmnu.c @@ -541,7 +541,9 @@ static int pum_set_selected(int n, int repeat)        if ((p_pvh > 0) && (p_pvh < g_do_tagpreview)) {          g_do_tagpreview = p_pvh;        } +      RedrawingDisabled++;        resized = prepare_tagpreview(false); +      RedrawingDisabled--;        g_do_tagpreview = 0;        if (curwin->w_p_pvw) { diff --git a/src/nvim/version.c b/src/nvim/version.c index 16afc816f8..9013542d3d 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -213,7 +213,7 @@ static int included_patches[] = {    //385,    //384 NA    383, -  //382, +  382,    381,    //380 NA    379, @@ -221,7 +221,7 @@ static int included_patches[] = {    377,    376,    //375, -  //374, +  374,    373,    372,    371, @@ -231,10 +231,10 @@ static int included_patches[] = {    367,    //366,    365, -  //364, +  364,    //363,    362, -  //361, +  361,    //360,    //359,    358,  | 
