From a2e48b556b7537acd26353b6cc201410be7cf3dc Mon Sep 17 00:00:00 2001 From: erw7 Date: Sun, 25 Aug 2019 13:45:45 +0900 Subject: vim-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 vim/vim#3362) Also display the line number with ":verbose set". https://github.com/vim/vim/commit/f29c1c6aa3f365c025890fab5fb9efbe88eb1761 --- src/nvim/buffer_defs.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/nvim/buffer_defs.h') diff --git a/src/nvim/buffer_defs.h b/src/nvim/buffer_defs.h index 5e700940b0..117e3f42fe 100644 --- a/src/nvim/buffer_defs.h +++ b/src/nvim/buffer_defs.h @@ -255,8 +255,8 @@ typedef struct { long wo_winbl; # define w_p_winbl w_onebuf_opt.wo_winbl // 'winblend' - LastSet wo_scriptID[WV_COUNT]; // SIDs for window-local options -# define w_p_scriptID w_onebuf_opt.wo_scriptID + LastSet wo_script_ctx[WV_COUNT]; // SCTXs for window-local options +# define w_p_script_ctx w_onebuf_opt.wo_script_ctx } winopt_T; /* @@ -344,17 +344,17 @@ typedef struct { */ typedef struct mapblock mapblock_T; struct mapblock { - mapblock_T *m_next; /* next mapblock in list */ - char_u *m_keys; /* mapped from, lhs */ - char_u *m_str; /* mapped to, rhs */ - char_u *m_orig_str; /* rhs as entered by the user */ - int m_keylen; /* strlen(m_keys) */ - int m_mode; /* valid mode */ - int m_noremap; /* if non-zero no re-mapping for m_str */ - char m_silent; /* used, don't echo commands */ - char m_nowait; /* used */ - char m_expr; /* used, m_str is an expression */ - scid_T m_script_ID; /* ID of script where map was defined */ + mapblock_T *m_next; // next mapblock in list + char_u *m_keys; // mapped from, lhs + char_u *m_str; // mapped to, rhs + char_u *m_orig_str; // rhs as entered by the user + int m_keylen; // strlen(m_keys) + int m_mode; // valid mode + int m_noremap; // if non-zero no re-mapping for m_str + char m_silent; // used, don't echo commands + char m_nowait; // used + char m_expr; // used, m_str is an expression + sctx_T m_script_ctx; // SCTX where map was defined }; /* @@ -622,9 +622,9 @@ struct file_buffer { * They are here because their value depends on the type of file * or contents of the file being edited. */ - bool b_p_initialized; /* set when options initialized */ + bool b_p_initialized; // set when options initialized - LastSet b_p_scriptID[BV_COUNT]; // SIDs for buffer-local options + LastSet b_p_script_ctx[BV_COUNT]; // SCTXs for buffer-local options int b_p_ai; ///< 'autoindent' int b_p_ai_nopaste; ///< b_p_ai saved for paste mode -- cgit