Mercurial > vim
comparison src/getchar.c @ 14700:0a3b9ecf7cb8 v8.1.0362
patch 8.1.0362: cannot get the script line number when executing a function
commit https://github.com/vim/vim/commit/f29c1c6aa3f365c025890fab5fb9efbe88eb1761
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Sep 10 21:05:02 2018 +0200
patch 8.1.0362: cannot get the script line number when executing a function
Problem: Cannot get the script line number when executing a function.
Solution: Store the line number besides the script ID. (Ozaki Kiichi,
closes #3362) Also display the line number with ":verbose set".
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 10 Sep 2018 21:15:07 +0200 |
parents | e29cbac5e8f6 |
children | 3b72808fbb0d |
comparison
equal
deleted
inserted
replaced
14699:2d2a36710dad | 14700:0a3b9ecf7cb8 |
---|---|
3675 mp->m_nowait = nowait; | 3675 mp->m_nowait = nowait; |
3676 mp->m_silent = silent; | 3676 mp->m_silent = silent; |
3677 mp->m_mode = mode; | 3677 mp->m_mode = mode; |
3678 #ifdef FEAT_EVAL | 3678 #ifdef FEAT_EVAL |
3679 mp->m_expr = expr; | 3679 mp->m_expr = expr; |
3680 mp->m_script_ID = current_SID; | 3680 mp->m_script_ctx = current_sctx; |
3681 mp->m_script_ctx.sc_lnum += sourcing_lnum; | |
3681 #endif | 3682 #endif |
3682 did_it = TRUE; | 3683 did_it = TRUE; |
3683 } | 3684 } |
3684 } | 3685 } |
3685 if (mp->m_mode == 0) /* entry can be deleted */ | 3686 if (mp->m_mode == 0) /* entry can be deleted */ |
3781 mp->m_nowait = nowait; | 3782 mp->m_nowait = nowait; |
3782 mp->m_silent = silent; | 3783 mp->m_silent = silent; |
3783 mp->m_mode = mode; | 3784 mp->m_mode = mode; |
3784 #ifdef FEAT_EVAL | 3785 #ifdef FEAT_EVAL |
3785 mp->m_expr = expr; | 3786 mp->m_expr = expr; |
3786 mp->m_script_ID = current_SID; | 3787 mp->m_script_ctx = current_sctx; |
3788 mp->m_script_ctx.sc_lnum += sourcing_lnum; | |
3787 #endif | 3789 #endif |
3788 | 3790 |
3789 /* add the new entry in front of the abbrlist or maphash[] list */ | 3791 /* add the new entry in front of the abbrlist or maphash[] list */ |
3790 if (abbrev) | 3792 if (abbrev) |
3791 { | 3793 { |
4095 vim_free(s); | 4097 vim_free(s); |
4096 } | 4098 } |
4097 } | 4099 } |
4098 #ifdef FEAT_EVAL | 4100 #ifdef FEAT_EVAL |
4099 if (p_verbose > 0) | 4101 if (p_verbose > 0) |
4100 last_set_msg(mp->m_script_ID); | 4102 last_set_msg(mp->m_script_ctx); |
4101 #endif | 4103 #endif |
4102 out_flush(); /* show one line at a time */ | 4104 out_flush(); /* show one line at a time */ |
4103 } | 4105 } |
4104 | 4106 |
4105 #if defined(FEAT_EVAL) || defined(PROTO) | 4107 #if defined(FEAT_EVAL) || defined(PROTO) |