Mercurial > vim
comparison src/scriptfile.c @ 34755:1a411f737239 v9.1.0255
patch 9.1.0255: Vim9: no indication of script nr in stack trace of classes
Commit: https://github.com/vim/vim/commit/16cdfa69e07190674a8e85a48144a467472ca2f4
Author: Ernie Rael <errael@raelity.com>
Date: Tue Apr 2 19:05:39 2024 +0200
patch 9.1.0255: Vim9: no indication of script nr in stack trace of classes
Problem: Vim9: no indication of script nr in stack trace of classes
Solution: Prefix the class name with the script name in the stack trace.
(Ernie Rael)
fixes: #14376
closes: #14390
Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 02 Apr 2024 19:15:04 +0200 |
parents | a089397c9bc6 |
children | 4cc31827e1db |
comparison
equal
deleted
inserted
replaced
34754:66e88c438206 | 34755:1a411f737239 |
---|---|
213 break; | 213 break; |
214 ga_concat(&ga, type_name); | 214 ga_concat(&ga, type_name); |
215 if (*class_name != NUL) | 215 if (*class_name != NUL) |
216 { | 216 { |
217 // For class methods prepend "<class name>." to the function name. | 217 // For class methods prepend "<class name>." to the function name. |
218 ga_concat(&ga, (char_u *)"<SNR>"); | |
219 ga.ga_len += vim_snprintf((char *)ga.ga_data + ga.ga_len, 23, | |
220 "%d_", entry->es_info.ufunc->uf_script_ctx.sc_sid); | |
218 ga_concat(&ga, class_name); | 221 ga_concat(&ga, class_name); |
219 ga_append(&ga, '.'); | 222 ga_append(&ga, '.'); |
220 } | 223 } |
221 ga_concat(&ga, entry->es_name); | 224 ga_concat(&ga, entry->es_name); |
222 // For the bottom entry of <sfile>: do not add the line number, it is used in | 225 // For the bottom entry of <sfile>: do not add the line number, it is used in |