char_u *end = find_termcode((char_u *)"PE");
int ret_char = -1;
int save_allow_keys = allow_keys;
+ int save_paste = p_paste;
+ int save_ai = curbuf->b_p_ai;
/* If the end code is too long we can't detect it, read everything. */
if (STRLEN(end) >= NUMBUFLEN)
end = NULL;
++no_mapping;
allow_keys = 0;
+ p_paste = TRUE;
+ curbuf->b_p_ai = FALSE;
+
for (;;)
{
/* When the end is not defined read everything. */
}
idx = 0;
}
+
--no_mapping;
allow_keys = save_allow_keys;
+ p_paste = save_paste;
+ curbuf->b_p_ai = save_ai;
return ret_char;
}
call assert_equal('bar donfoo', getline(3))
call assert_equal('bar doneeb', getline(4))
call assert_equal('c', getline(5))
+
+ set ai et tw=10
+ call setline(1, ['a', ' b', 'c'])
+ 2
+ call feedkeys("A\<Esc>[200~foo\<CR> bar bar bar\<Esc>[201~\<Esc>", 'xt')
+ call assert_equal(' bfoo', getline(2))
+ call assert_equal(' bar bar bar', getline(3))
+ call assert_equal('c', getline(4))
+
+ set ai& et& tw=0
bwipe!
endfunc
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 238,
/**/
237,
/**/