Problem: Crash when recording and using Select mode.
Solution: When deleting the last recorded character check there is something
to delete.
static void
delete_buff_tail(buffheader_T *buf, int slen)
{
- int len = (int)STRLEN(buf->bh_curr->b_str);
+ int len;
+ if (buf->bh_curr == NULL || buf->bh_curr->b_str == NULL)
+ return; // nothing to delete
+ len = (int)STRLEN(buf->bh_curr->b_str);
if (len >= slen)
{
buf->bh_curr->b_str[len - slen] = NUL;
bwipe!
endfunc
+func Test_record_in_select_mode()
+ new
+ call setline(1, 'text')
+ sil norm \16q0\a0
+ sil norm q
+ call assert_equal('0ext', getline(1))
+ bwipe!
+endfunc
+
" Make sure that y_append is correctly reset
" and the previous register is working as expected
func Test_register_y_append_reset()
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 4233,
/**/
4232,
/**/