summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0685
diff options
context:
space:
mode:
Diffstat (limited to 'data/vim/patches/8.1.0685')
-rw-r--r--data/vim/patches/8.1.0685434
1 files changed, 434 insertions, 0 deletions
diff --git a/data/vim/patches/8.1.0685 b/data/vim/patches/8.1.0685
new file mode 100644
index 000000000..e209adde5
--- /dev/null
+++ b/data/vim/patches/8.1.0685
@@ -0,0 +1,434 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0685
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0685
+Problem: get_buf_tv() is named inconsistently.
+Solution: Rename it to tv_get_buf(). (Yegappan Lakshmanan, closes #3759)
+Files: src/evalfunc.c, src/proto/evalfunc.pro, src/terminal.c,
+ src/textprop.c
+
+
+*** ../vim-8.1.0684/src/evalfunc.c 2019-01-02 13:40:26.989339500 +0100
+--- src/evalfunc.c 2019-01-03 22:17:14.412655875 +0100
+***************
+*** 1424,1430 ****
+ linenr_T lnum;
+ buf_T *buf;
+
+! buf = get_buf_tv(&argvars[0], FALSE);
+ if (buf == NULL)
+ rettv->vval.v_number = 1; /* FAIL */
+ else
+--- 1424,1430 ----
+ linenr_T lnum;
+ buf_T *buf;
+
+! buf = tv_get_buf(&argvars[0], FALSE);
+ if (buf == NULL)
+ rettv->vval.v_number = 1; /* FAIL */
+ else
+***************
+*** 1892,1898 ****
+ * Get buffer by number or pattern.
+ */
+ buf_T *
+! get_buf_tv(typval_T *tv, int curtab_only)
+ {
+ char_u *name = tv->vval.v_string;
+ buf_T *buf;
+--- 1892,1898 ----
+ * Get buffer by number or pattern.
+ */
+ buf_T *
+! tv_get_buf(typval_T *tv, int curtab_only)
+ {
+ char_u *name = tv->vval.v_string;
+ buf_T *buf;
+***************
+*** 1925,1931 ****
+
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+! buf = get_buf_tv(&argvars[0], FALSE);
+ rettv->v_type = VAR_STRING;
+ if (buf != NULL && buf->b_fname != NULL)
+ rettv->vval.v_string = vim_strsave(buf->b_fname);
+--- 1925,1931 ----
+
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+! buf = tv_get_buf(&argvars[0], FALSE);
+ rettv->v_type = VAR_STRING;
+ if (buf != NULL && buf->b_fname != NULL)
+ rettv->vval.v_string = vim_strsave(buf->b_fname);
+***************
+*** 1946,1952 ****
+
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+! buf = get_buf_tv(&argvars[0], FALSE);
+ --emsg_off;
+
+ /* If the buffer isn't found and the second argument is not zero create a
+--- 1946,1952 ----
+
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+! buf = tv_get_buf(&argvars[0], FALSE);
+ --emsg_off;
+
+ /* If the buffer isn't found and the second argument is not zero create a
+***************
+*** 1974,1980 ****
+
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+! buf = get_buf_tv(&argvars[0], TRUE);
+ FOR_ALL_WINDOWS(wp)
+ {
+ ++winnr;
+--- 1974,1980 ----
+
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+! buf = tv_get_buf(&argvars[0], TRUE);
+ FOR_ALL_WINDOWS(wp)
+ {
+ ++winnr;
+***************
+*** 2962,2968 ****
+ tabpage_T *tp;
+ win_T *wp;
+
+! buf = get_buf_tv(&argvars[0], FALSE);
+ if (buf == NULL)
+ {
+ rettv->vval.v_number = 1; /* FAIL */
+--- 2962,2968 ----
+ tabpage_T *tp;
+ win_T *wp;
+
+! buf = tv_get_buf(&argvars[0], FALSE);
+ if (buf == NULL)
+ {
+ rettv->vval.v_number = 1; /* FAIL */
+***************
+*** 4525,4531 ****
+ /* Information about one buffer. Argument specifies the buffer */
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+! argbuf = get_buf_tv(&argvars[0], FALSE);
+ --emsg_off;
+ if (argbuf == NULL)
+ return;
+--- 4525,4531 ----
+ /* Information about one buffer. Argument specifies the buffer */
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+! argbuf = tv_get_buf(&argvars[0], FALSE);
+ --emsg_off;
+ if (argbuf == NULL)
+ return;
+***************
+*** 4609,4615 ****
+
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+! buf = get_buf_tv(&argvars[0], FALSE);
+ --emsg_off;
+
+ lnum = tv_get_lnum_buf(&argvars[1], buf);
+--- 4609,4615 ----
+
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+! buf = tv_get_buf(&argvars[0], FALSE);
+ --emsg_off;
+
+ lnum = tv_get_lnum_buf(&argvars[1], buf);
+***************
+*** 4636,4642 ****
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ varname = tv_get_string_chk(&argvars[1]);
+ ++emsg_off;
+! buf = get_buf_tv(&argvars[0], FALSE);
+
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = NULL;
+--- 4636,4642 ----
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ varname = tv_get_string_chk(&argvars[1]);
+ ++emsg_off;
+! buf = tv_get_buf(&argvars[0], FALSE);
+
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = NULL;
+***************
+*** 4707,4713 ****
+ #ifdef FEAT_JUMPLIST
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+! buf = get_buf_tv(&argvars[0], FALSE);
+ --emsg_off;
+ if (buf == NULL)
+ return;
+--- 4707,4713 ----
+ #ifdef FEAT_JUMPLIST
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+! buf = tv_get_buf(&argvars[0], FALSE);
+ --emsg_off;
+ if (buf == NULL)
+ return;
+***************
+*** 8721,8727 ****
+
+ if (check_secure())
+ return;
+! buf = get_buf_tv(&argvars[0], FALSE);
+ if (buf == NULL)
+ return;
+
+--- 8721,8727 ----
+
+ if (check_secure())
+ return;
+! buf = tv_get_buf(&argvars[0], FALSE);
+ if (buf == NULL)
+ return;
+
+***************
+*** 8750,8756 ****
+
+ if (check_secure())
+ return;
+! buf = get_buf_tv(&argvars[0], FALSE);
+ if (buf == NULL)
+ return;
+
+--- 8750,8756 ----
+
+ if (check_secure())
+ return;
+! buf = tv_get_buf(&argvars[0], FALSE);
+ if (buf == NULL)
+ return;
+
+***************
+*** 8778,8784 ****
+
+ if (check_secure())
+ return;
+! buf = get_buf_tv(&argvars[0], FALSE);
+ if (buf == NULL)
+ return;
+
+--- 8778,8784 ----
+
+ if (check_secure())
+ return;
+! buf = tv_get_buf(&argvars[0], FALSE);
+ if (buf == NULL)
+ return;
+
+***************
+*** 10580,10586 ****
+ linenr_T lnum;
+ buf_T *buf;
+
+! buf = get_buf_tv(&argvars[0], FALSE);
+ if (buf == NULL)
+ rettv->vval.v_number = 1; /* FAIL */
+ else
+--- 10580,10586 ----
+ linenr_T lnum;
+ buf_T *buf;
+
+! buf = tv_get_buf(&argvars[0], FALSE);
+ if (buf == NULL)
+ rettv->vval.v_number = 1; /* FAIL */
+ else
+***************
+*** 10605,10611 ****
+ return;
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ varname = tv_get_string_chk(&argvars[1]);
+! buf = get_buf_tv(&argvars[0], FALSE);
+ varp = &argvars[2];
+
+ if (buf != NULL && varname != NULL && varp != NULL)
+--- 10605,10611 ----
+ return;
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ varname = tv_get_string_chk(&argvars[1]);
+! buf = tv_get_buf(&argvars[0], FALSE);
+ varp = &argvars[2];
+
+ if (buf != NULL && varname != NULL && varp != NULL)
+***************
+*** 11365,11371 ****
+ if (argvars[0].v_type != VAR_UNKNOWN)
+ {
+ // get signs placed in this buffer
+! buf = get_buf_tv(&argvars[0], FALSE);
+ if (buf == NULL)
+ {
+ EMSG2(_("E158: Invalid buffer name: %s"),
+--- 11365,11371 ----
+ if (argvars[0].v_type != VAR_UNKNOWN)
+ {
+ // get signs placed in this buffer
+! buf = tv_get_buf(&argvars[0], FALSE);
+ if (buf == NULL)
+ {
+ EMSG2(_("E158: Invalid buffer name: %s"),
+***************
+*** 11457,11463 ****
+ goto cleanup;
+
+ // Buffer to place the sign
+! buf = get_buf_tv(&argvars[3], FALSE);
+ if (buf == NULL)
+ {
+ EMSG2(_("E158: Invalid buffer name: %s"), tv_get_string(&argvars[2]));
+--- 11457,11463 ----
+ goto cleanup;
+
+ // Buffer to place the sign
+! buf = tv_get_buf(&argvars[3], FALSE);
+ if (buf == NULL)
+ {
+ EMSG2(_("E158: Invalid buffer name: %s"), tv_get_string(&argvars[2]));
+***************
+*** 11566,11572 ****
+
+ if ((di = dict_find(dict, (char_u *)"buffer", -1)) != NULL)
+ {
+! buf = get_buf_tv(&di->di_tv, FALSE);
+ if (buf == NULL)
+ {
+ EMSG2(_("E158: Invalid buffer name: %s"),
+--- 11566,11572 ----
+
+ if ((di = dict_find(dict, (char_u *)"buffer", -1)) != NULL)
+ {
+! buf = tv_get_buf(&di->di_tv, FALSE);
+ if (buf == NULL)
+ {
+ EMSG2(_("E158: Invalid buffer name: %s"),
+***************
+*** 12812,12818 ****
+ buf_T *buf;
+
+ rettv->v_type = VAR_STRING;
+! buf = get_buf_tv(&argvars[0], FALSE);
+ if (buf == NULL || buf->b_ml.ml_mfp == NULL
+ || buf->b_ml.ml_mfp->mf_fname == NULL)
+ rettv->vval.v_string = NULL;
+--- 12812,12818 ----
+ buf_T *buf;
+
+ rettv->v_type = VAR_STRING;
+! buf = tv_get_buf(&argvars[0], FALSE);
+ if (buf == NULL || buf->b_ml.ml_mfp == NULL
+ || buf->b_ml.ml_mfp->mf_fname == NULL)
+ rettv->vval.v_string = NULL;
+*** ../vim-8.1.0684/src/proto/evalfunc.pro 2018-12-22 13:27:59.115503998 +0100
+--- src/proto/evalfunc.pro 2019-01-03 22:17:14.412655875 +0100
+***************
+*** 4,10 ****
+ int find_internal_func(char_u *name);
+ int call_internal_func(char_u *name, int argcount, typval_T *argvars, typval_T *rettv);
+ buf_T *buflist_find_by_name(char_u *name, int curtab_only);
+! buf_T *get_buf_tv(typval_T *tv, int curtab_only);
+ void execute_redir_str(char_u *value, int value_len);
+ void mzscheme_call_vim(char_u *name, typval_T *args, typval_T *rettv);
+ float_T vim_round(float_T f);
+--- 4,10 ----
+ int find_internal_func(char_u *name);
+ int call_internal_func(char_u *name, int argcount, typval_T *argvars, typval_T *rettv);
+ buf_T *buflist_find_by_name(char_u *name, int curtab_only);
+! buf_T *tv_get_buf(typval_T *tv, int curtab_only);
+ void execute_redir_str(char_u *value, int value_len);
+ void mzscheme_call_vim(char_u *name, typval_T *args, typval_T *rettv);
+ float_T vim_round(float_T f);
+*** ../vim-8.1.0684/src/terminal.c 2018-12-27 21:26:56.426251398 +0100
+--- src/terminal.c 2019-01-03 22:17:14.412655875 +0100
+***************
+*** 3842,3848 ****
+
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+! buf = get_buf_tv(&argvars[0], FALSE);
+ --emsg_off;
+ if (buf == NULL || buf->b_term == NULL)
+ {
+--- 3842,3848 ----
+
+ (void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
+ ++emsg_off;
+! buf = tv_get_buf(&argvars[0], FALSE);
+ --emsg_off;
+ if (buf == NULL || buf->b_term == NULL)
+ {
+*** ../vim-8.1.0684/src/textprop.c 2019-01-03 21:55:28.445763264 +0100
+--- src/textprop.c 2019-01-03 22:17:14.412655875 +0100
+***************
+*** 130,136 ****
+ di = dict_find(arg->vval.v_dict, (char_u *)"bufnr", -1);
+ if (di != NULL)
+ {
+! *buf = get_buf_tv(&di->di_tv, FALSE);
+ if (*buf == NULL)
+ return FAIL;
+ }
+--- 130,136 ----
+ di = dict_find(arg->vval.v_dict, (char_u *)"bufnr", -1);
+ if (di != NULL)
+ {
+! *buf = tv_get_buf(&di->di_tv, FALSE);
+ if (*buf == NULL)
+ return FAIL;
+ }
+***************
+*** 533,539 ****
+ di = dict_find(dict, (char_u *)"bufnr", -1);
+ if (di != NULL)
+ {
+! buf = get_buf_tv(&di->di_tv, FALSE);
+ if (buf == NULL)
+ return;
+ }
+--- 533,539 ----
+ di = dict_find(dict, (char_u *)"bufnr", -1);
+ if (di != NULL)
+ {
+! buf = tv_get_buf(&di->di_tv, FALSE);
+ if (buf == NULL)
+ return;
+ }
+*** ../vim-8.1.0684/src/version.c 2019-01-03 21:55:28.445763264 +0100
+--- src/version.c 2019-01-03 22:16:39.124922332 +0100
+***************
+*** 801,802 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 685,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+96. On Super Bowl Sunday, you followed the score by going to the
+ Yahoo main page instead of turning on the TV.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///