mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 07:48:18 +00:00
vim-patch:7.4.1032
Problem: message from assert_false() does not look nice.
Solution: Handle missing sourcing_name. Use right number of spaces. (Watiko)
Don't use line number if it's zero.
cbfe32953a
This commit is contained in:
@@ -7992,11 +7992,20 @@ static void prepare_assert_error(garray_T *gap)
|
|||||||
char buf[NUMBUFLEN];
|
char buf[NUMBUFLEN];
|
||||||
|
|
||||||
ga_init(gap, 1, 100);
|
ga_init(gap, 1, 100);
|
||||||
|
if (sourcing_name != NULL) {
|
||||||
ga_concat(gap, sourcing_name);
|
ga_concat(gap, sourcing_name);
|
||||||
|
if (sourcing_lnum > 0) {
|
||||||
|
ga_concat(gap, (char_u *)" ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (sourcing_lnum > 0) {
|
||||||
vim_snprintf(buf, ARRAY_SIZE(buf), "line %ld", (long)sourcing_lnum);
|
vim_snprintf(buf, ARRAY_SIZE(buf), "line %ld", (long)sourcing_lnum);
|
||||||
ga_concat(gap, (char_u *)buf);
|
ga_concat(gap, (char_u *)buf);
|
||||||
|
}
|
||||||
|
if (sourcing_name != NULL || sourcing_lnum > 0) {
|
||||||
ga_concat(gap, (char_u *)": ");
|
ga_concat(gap, (char_u *)": ");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Fill "gap" with information about an assert error.
|
// Fill "gap" with information about an assert error.
|
||||||
static void fill_assert_error(garray_T *gap, typval_T *opt_msg_tv,
|
static void fill_assert_error(garray_T *gap, typval_T *opt_msg_tv,
|
||||||
|
@@ -69,6 +69,38 @@ static char *features[] = {
|
|||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
static int included_patches[] = {
|
static int included_patches[] = {
|
||||||
|
1032,
|
||||||
|
// 1031,
|
||||||
|
// 1030,
|
||||||
|
// 1029,
|
||||||
|
// 1028,
|
||||||
|
// 1027,
|
||||||
|
// 1026,
|
||||||
|
// 1025,
|
||||||
|
// 1024,
|
||||||
|
// 1023,
|
||||||
|
// 1022,
|
||||||
|
// 1021,
|
||||||
|
// 1020,
|
||||||
|
// 1019,
|
||||||
|
// 1018,
|
||||||
|
// 1017,
|
||||||
|
// 1016,
|
||||||
|
// 1015,
|
||||||
|
// 1014,
|
||||||
|
// 1013,
|
||||||
|
// 1012,
|
||||||
|
// 1011,
|
||||||
|
// 1010,
|
||||||
|
// 1009,
|
||||||
|
// 1008,
|
||||||
|
// 1007,
|
||||||
|
// 1006,
|
||||||
|
// 1005,
|
||||||
|
// 1004,
|
||||||
|
// 1003,
|
||||||
|
// 1002,
|
||||||
|
// 1001,
|
||||||
// 1000,
|
// 1000,
|
||||||
// 999 NA
|
// 999 NA
|
||||||
// 998,
|
// 998,
|
||||||
|
Reference in New Issue
Block a user