mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.1.1671: copying a blob may result in it being locked
Problem: Copying a blob may result in it being locked. Solution: Reset v_lock. (Ken Takata, closes #4648)
This commit is contained in:
parent
0231f8312b
commit
b7b9efbccf
@ -63,6 +63,7 @@ blob_copy(typval_T *from, typval_T *to)
|
|||||||
int ret = OK;
|
int ret = OK;
|
||||||
|
|
||||||
to->v_type = VAR_BLOB;
|
to->v_type = VAR_BLOB;
|
||||||
|
to->v_lock = 0;
|
||||||
if (from->vval.v_blob == NULL)
|
if (from->vval.v_blob == NULL)
|
||||||
to->vval.v_blob = NULL;
|
to->vval.v_blob = NULL;
|
||||||
else if (rettv_blob_alloc(to) == FAIL)
|
else if (rettv_blob_alloc(to) == FAIL)
|
||||||
|
@ -71,6 +71,10 @@ func Test_blob_assign()
|
|||||||
call assert_fails('let b .= "xx"', 'E734:')
|
call assert_fails('let b .= "xx"', 'E734:')
|
||||||
call assert_fails('let b += "xx"', 'E734:')
|
call assert_fails('let b += "xx"', 'E734:')
|
||||||
call assert_fails('let b[1:1] .= 0z55', 'E734:')
|
call assert_fails('let b[1:1] .= 0z55', 'E734:')
|
||||||
|
|
||||||
|
let l = [0z12]
|
||||||
|
let m = deepcopy(l)
|
||||||
|
let m[0] = 0z34 " E742 or E741 should not occur.
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_blob_get_range()
|
func Test_blob_get_range()
|
||||||
|
@ -777,6 +777,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1671,
|
||||||
/**/
|
/**/
|
||||||
1670,
|
1670,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user