Mercurial > vim
comparison src/evalfunc.c @ 15615:536fca2cee19 v8.1.0815
patch 8.1.0815: dialog for file changed outside of Vim not tested
commit https://github.com/vim/vim/commit/5e66b42aae7c67a3ef67617d4bd43052ac2b73ce
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jan 24 21:58:10 2019 +0100
patch 8.1.0815: dialog for file changed outside of Vim not tested
Problem: Dialog for file changed outside of Vim not tested.
Solution: Add a test. Move FileChangedShell test. Add 'L' flag to
feedkeys().
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 24 Jan 2019 22:00:05 +0100 |
parents | 1ec942f1b648 |
children | 6f1c7e9a6393 |
comparison
equal
deleted
inserted
replaced
15614:19317f8fdd2c | 15615:536fca2cee19 |
---|---|
3672 char_u *keys, *flags; | 3672 char_u *keys, *flags; |
3673 char_u nbuf[NUMBUFLEN]; | 3673 char_u nbuf[NUMBUFLEN]; |
3674 int typed = FALSE; | 3674 int typed = FALSE; |
3675 int execute = FALSE; | 3675 int execute = FALSE; |
3676 int dangerous = FALSE; | 3676 int dangerous = FALSE; |
3677 int lowlevel = FALSE; | |
3677 char_u *keys_esc; | 3678 char_u *keys_esc; |
3678 | 3679 |
3679 /* This is not allowed in the sandbox. If the commands would still be | 3680 /* This is not allowed in the sandbox. If the commands would still be |
3680 * executed in the sandbox it would be OK, but it probably happens later, | 3681 * executed in the sandbox it would be OK, but it probably happens later, |
3681 * when "sandbox" is no longer set. */ | 3682 * when "sandbox" is no longer set. */ |
3695 case 'm': remap = TRUE; break; | 3696 case 'm': remap = TRUE; break; |
3696 case 't': typed = TRUE; break; | 3697 case 't': typed = TRUE; break; |
3697 case 'i': insert = TRUE; break; | 3698 case 'i': insert = TRUE; break; |
3698 case 'x': execute = TRUE; break; | 3699 case 'x': execute = TRUE; break; |
3699 case '!': dangerous = TRUE; break; | 3700 case '!': dangerous = TRUE; break; |
3701 case 'L': lowlevel = TRUE; break; | |
3700 } | 3702 } |
3701 } | 3703 } |
3702 } | 3704 } |
3703 | 3705 |
3704 if (*keys != NUL || execute) | 3706 if (*keys != NUL || execute) |
3706 /* Need to escape K_SPECIAL and CSI before putting the string in the | 3708 /* Need to escape K_SPECIAL and CSI before putting the string in the |
3707 * typeahead buffer. */ | 3709 * typeahead buffer. */ |
3708 keys_esc = vim_strsave_escape_csi(keys); | 3710 keys_esc = vim_strsave_escape_csi(keys); |
3709 if (keys_esc != NULL) | 3711 if (keys_esc != NULL) |
3710 { | 3712 { |
3711 ins_typebuf(keys_esc, (remap ? REMAP_YES : REMAP_NONE), | 3713 if (lowlevel) |
3714 { | |
3715 #ifdef USE_INPUT_BUF | |
3716 add_to_input_buf(keys, (int)STRLEN(keys)); | |
3717 #else | |
3718 emsg(_("E980: lowlevel input not supported")); | |
3719 #endif | |
3720 } | |
3721 else | |
3722 ins_typebuf(keys_esc, (remap ? REMAP_YES : REMAP_NONE), | |
3712 insert ? 0 : typebuf.tb_len, !typed, FALSE); | 3723 insert ? 0 : typebuf.tb_len, !typed, FALSE); |
3713 vim_free(keys_esc); | 3724 vim_free(keys_esc); |
3714 if (vgetc_busy | 3725 if (vgetc_busy |
3715 #ifdef FEAT_TIMERS | 3726 #ifdef FEAT_TIMERS |
3716 || timer_busy | 3727 || timer_busy |