vim-patch:7.4.879

Problem:    Can't see line numbers in nested function calls.
Solution:   Add line number to the file name. (Alberto Fanjul)

1d6328ca00
This commit is contained in:
watiko
2016-02-15 14:48:39 +09:00
parent e3bf1385e6
commit 5b1a536d50
2 changed files with 10 additions and 6 deletions

View File

@@ -20873,14 +20873,18 @@ call_user_func (
save_sourcing_name = sourcing_name;
save_sourcing_lnum = sourcing_lnum;
sourcing_lnum = 1;
sourcing_name = xmalloc((save_sourcing_name == NULL ? 0 : STRLEN(save_sourcing_name))
+ STRLEN(fp->uf_name) + 13);
// need space for function name + ("function " + 3) or "[number]"
size_t len = (save_sourcing_name == NULL ? 0 : STRLEN(save_sourcing_name))
+ STRLEN(fp->uf_name) + 20;
sourcing_name = xmalloc(len);
{
if (save_sourcing_name != NULL
&& STRNCMP(save_sourcing_name, "function ", 9) == 0)
sprintf((char *)sourcing_name, "%s..", save_sourcing_name);
else
&& STRNCMP(save_sourcing_name, "function ", 9) == 0) {
vim_snprintf((char *)sourcing_name, len, "%s[%zu]..",
save_sourcing_name, save_sourcing_lnum);
} else {
STRCPY(sourcing_name, "function ");
}
cat_func_name(sourcing_name + STRLEN(sourcing_name), fp);
if (p_verbose >= 12) {

View File

@@ -409,7 +409,7 @@ static int included_patches[] = {
// 882,
// 881,
// 880 NA
// 879,
879,
// 878,
// 877,
// 876 NA