mirror of
https://github.com/neovim/neovim.git
synced 2025-09-08 12:28:18 +00:00
Merge pull request #14088 from janlazo/vim-8.2.2577
vim-patch:8.1.0783,8.2.{1507,2152,2438,2577}
This commit is contained in:
@@ -5280,14 +5280,10 @@ bool set_ref_in_item(typval_T *tv, int copyID, ht_stack_T **ht_stack,
|
|||||||
if (ht_stack == NULL) {
|
if (ht_stack == NULL) {
|
||||||
abort = set_ref_in_ht(&dd->dv_hashtab, copyID, list_stack);
|
abort = set_ref_in_ht(&dd->dv_hashtab, copyID, list_stack);
|
||||||
} else {
|
} else {
|
||||||
ht_stack_T *newitem = try_malloc(sizeof(ht_stack_T));
|
ht_stack_T *const newitem = xmalloc(sizeof(ht_stack_T));
|
||||||
if (newitem == NULL) {
|
newitem->ht = &dd->dv_hashtab;
|
||||||
abort = true;
|
newitem->prev = *ht_stack;
|
||||||
} else {
|
*ht_stack = newitem;
|
||||||
newitem->ht = &dd->dv_hashtab;
|
|
||||||
newitem->prev = *ht_stack;
|
|
||||||
*ht_stack = newitem;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QUEUE *w = NULL;
|
QUEUE *w = NULL;
|
||||||
@@ -5308,14 +5304,10 @@ bool set_ref_in_item(typval_T *tv, int copyID, ht_stack_T **ht_stack,
|
|||||||
if (list_stack == NULL) {
|
if (list_stack == NULL) {
|
||||||
abort = set_ref_in_list(ll, copyID, ht_stack);
|
abort = set_ref_in_list(ll, copyID, ht_stack);
|
||||||
} else {
|
} else {
|
||||||
list_stack_T *newitem = try_malloc(sizeof(list_stack_T));
|
list_stack_T *const newitem = xmalloc(sizeof(list_stack_T));
|
||||||
if (newitem == NULL) {
|
newitem->list = ll;
|
||||||
abort = true;
|
newitem->prev = *list_stack;
|
||||||
} else {
|
*list_stack = newitem;
|
||||||
newitem->list = ll;
|
|
||||||
newitem->prev = *list_stack;
|
|
||||||
*list_stack = newitem;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@@ -341,8 +341,9 @@ struct ufunc {
|
|||||||
///< used for s: variables
|
///< used for s: variables
|
||||||
int uf_refcount; ///< reference count, see func_name_refcount()
|
int uf_refcount; ///< reference count, see func_name_refcount()
|
||||||
funccall_T *uf_scoped; ///< l: local variables for closure
|
funccall_T *uf_scoped; ///< l: local variables for closure
|
||||||
char_u uf_name[]; ///< Name of function; can start with <SNR>123_
|
char_u uf_name[]; ///< Name of function (actual size equals name);
|
||||||
///< (<SNR> is K_SPECIAL KS_EXTRA KE_SNR)
|
///< can start with <SNR>123_
|
||||||
|
///< (<SNR> is K_SPECIAL KS_EXTRA KE_SNR)
|
||||||
};
|
};
|
||||||
|
|
||||||
struct partial_S {
|
struct partial_S {
|
||||||
|
@@ -3859,8 +3859,8 @@ static void ml_updatechunk(buf_T *buf, linenr_T line, long len, int updtype)
|
|||||||
/* May resize here so we don't have to do it in both cases below */
|
/* May resize here so we don't have to do it in both cases below */
|
||||||
if (buf->b_ml.ml_usedchunks + 1 >= buf->b_ml.ml_numchunks) {
|
if (buf->b_ml.ml_usedchunks + 1 >= buf->b_ml.ml_numchunks) {
|
||||||
buf->b_ml.ml_numchunks = buf->b_ml.ml_numchunks * 3 / 2;
|
buf->b_ml.ml_numchunks = buf->b_ml.ml_numchunks * 3 / 2;
|
||||||
buf->b_ml.ml_chunksize = (chunksize_T *)
|
buf->b_ml.ml_chunksize = xrealloc(
|
||||||
xrealloc(buf->b_ml.ml_chunksize,
|
buf->b_ml.ml_chunksize,
|
||||||
sizeof(chunksize_T) * buf->b_ml.ml_numchunks);
|
sizeof(chunksize_T) * buf->b_ml.ml_numchunks);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -2656,7 +2656,7 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow,
|
|||||||
// already be in use.
|
// already be in use.
|
||||||
xfree(p_extra_free);
|
xfree(p_extra_free);
|
||||||
p_extra_free = xmalloc(MAX_MCO * fdc + 1);
|
p_extra_free = xmalloc(MAX_MCO * fdc + 1);
|
||||||
n_extra = fill_foldcolumn(p_extra_free, wp, foldinfo, lnum);
|
n_extra = (int)fill_foldcolumn(p_extra_free, wp, foldinfo, lnum);
|
||||||
p_extra_free[n_extra] = NUL;
|
p_extra_free[n_extra] = NUL;
|
||||||
p_extra = p_extra_free;
|
p_extra = p_extra_free;
|
||||||
c_extra = NUL;
|
c_extra = NUL;
|
||||||
|
@@ -92,6 +92,11 @@ func Test_screenpos()
|
|||||||
\ 'endcol': wincol + 9}, screenpos(winid, 2, 22))
|
\ 'endcol': wincol + 9}, screenpos(winid, 2, 22))
|
||||||
close
|
close
|
||||||
bwipe!
|
bwipe!
|
||||||
|
|
||||||
|
call assert_equal({'col': 1, 'row': 1, 'endcol': 1, 'curscol': 1}, screenpos(win_getid(), 1, 1))
|
||||||
|
nmenu WinBar.TEST :
|
||||||
|
call assert_equal({'col': 1, 'row': 2, 'endcol': 1, 'curscol': 1}, screenpos(win_getid(), 1, 1))
|
||||||
|
nunmenu WinBar.TEST
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_screenpos_number()
|
func Test_screenpos_number()
|
||||||
|
Reference in New Issue
Block a user