Mercurial > vim
comparison src/eval.c @ 7135:9d4986f52df8 v7.4.879
commit https://github.com/vim/vim/commit/1d6328ca00fc6cfe37b1f5e038ec23f443258886
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Sep 25 17:37:16 2015 +0200
patch 7.4.879
Problem: Can't see line numbers in nested function calls.
Solution: Add line number to the file name. (Alberto Fanjul)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 25 Sep 2015 17:45:04 +0200 |
parents | 5fc5c5bf2233 |
children | a01294e1c02f |
comparison
equal
deleted
inserted
replaced
7134:e97a99a62e87 | 7135:9d4986f52df8 |
---|---|
23815 int fixvar_idx = 0; /* index in fixvar[] */ | 23815 int fixvar_idx = 0; /* index in fixvar[] */ |
23816 int i; | 23816 int i; |
23817 int ai; | 23817 int ai; |
23818 char_u numbuf[NUMBUFLEN]; | 23818 char_u numbuf[NUMBUFLEN]; |
23819 char_u *name; | 23819 char_u *name; |
23820 size_t len; | |
23820 #ifdef FEAT_PROFILE | 23821 #ifdef FEAT_PROFILE |
23821 proftime_T wait_start; | 23822 proftime_T wait_start; |
23822 proftime_T call_start; | 23823 proftime_T call_start; |
23823 #endif | 23824 #endif |
23824 | 23825 |
23946 /* Don't redraw while executing the function. */ | 23947 /* Don't redraw while executing the function. */ |
23947 ++RedrawingDisabled; | 23948 ++RedrawingDisabled; |
23948 save_sourcing_name = sourcing_name; | 23949 save_sourcing_name = sourcing_name; |
23949 save_sourcing_lnum = sourcing_lnum; | 23950 save_sourcing_lnum = sourcing_lnum; |
23950 sourcing_lnum = 1; | 23951 sourcing_lnum = 1; |
23951 sourcing_name = alloc((unsigned)((save_sourcing_name == NULL ? 0 | 23952 /* need space for function name + ("function " + 3) or "[number]" */ |
23952 : STRLEN(save_sourcing_name)) + STRLEN(fp->uf_name) + 13)); | 23953 len = (save_sourcing_name == NULL ? 0 : STRLEN(save_sourcing_name)) |
23954 + STRLEN(fp->uf_name) + 20; | |
23955 sourcing_name = alloc((unsigned)len); | |
23953 if (sourcing_name != NULL) | 23956 if (sourcing_name != NULL) |
23954 { | 23957 { |
23955 if (save_sourcing_name != NULL | 23958 if (save_sourcing_name != NULL |
23956 && STRNCMP(save_sourcing_name, "function ", 9) == 0) | 23959 && STRNCMP(save_sourcing_name, "function ", 9) == 0) |
23957 sprintf((char *)sourcing_name, "%s..", save_sourcing_name); | 23960 sprintf((char *)sourcing_name, "%s[%d]..", |
23961 save_sourcing_name, (int)save_sourcing_lnum); | |
23958 else | 23962 else |
23959 STRCPY(sourcing_name, "function "); | 23963 STRCPY(sourcing_name, "function "); |
23960 cat_func_name(sourcing_name + STRLEN(sourcing_name), fp); | 23964 cat_func_name(sourcing_name + STRLEN(sourcing_name), fp); |
23961 | 23965 |
23962 if (p_verbose >= 12) | 23966 if (p_verbose >= 12) |