From 1a1fe58f7e947abb3c6389a98b17ad54f18c353f Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 6 Apr 2021 18:56:57 -0400 Subject: vim-patch:8.0.1505: debugger can't break on a condition Problem: Debugger can't break on a condition. (Charles Campbell) Solution: Add ":breakadd expr". (Christian Brabandt, closes vim/vim#859) https://github.com/vim/vim/commit/c6f9f739d32084923c3031cbf6f581f8c8bf7fd2 Do not port "has_watchexpr()" to avoid dead code. "has_watchexpr()" always returns 0 because "debug_expr" is always 0. Restore "eval_expr()" as a wrapper to allocate "typval_T" for "eval0()". Remove it in later patches. Include "typval_compare()" changes from patch v8.1.0958, partially ported in 8b60368c1b9e23f0695557da170d416d71f7e6a3. Close https://github.com/neovim/neovim/pull/12373 N/A patches for version.c: vim-patch:8.2.2720: GTK menu tooltip moves the cursor Problem: GTK menu tooltip moves the cursor. Solution: Position the cursor after displaying the tooltip. Do not show the tooltip when editing the command line. https://github.com/vim/vim/commit/01ac0a1f664c5b1ffd5c9ef196d4b47edf2fd494 --- src/nvim/eval/funcs.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) (limited to 'src/nvim/eval') diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index fb72b9425e..0d288e2cc2 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -2051,7 +2051,6 @@ static void f_exepath(typval_T *argvars, typval_T *rettv, FunPtr fptr) static void f_exists(typval_T *argvars, typval_T *rettv, FunPtr fptr) { int n = false; - int len = 0; const char *p = tv_get_string(&argvars[0]); if (*p == '$') { // Environment variable. @@ -2082,29 +2081,7 @@ static void f_exists(typval_T *argvars, typval_T *rettv, FunPtr fptr) n = au_exists(p + 1); } } else { // Internal variable. - typval_T tv; - - // get_name_len() takes care of expanding curly braces - const char *name = p; - char *tofree; - len = get_name_len((const char **)&p, &tofree, true, false); - if (len > 0) { - if (tofree != NULL) { - name = tofree; - } - n = (get_var_tv(name, len, &tv, NULL, false, true) == OK); - if (n) { - // Handle d.key, l[idx], f(expr). - n = (handle_subscript(&p, &tv, true, false) == OK); - if (n) { - tv_clear(&tv); - } - } - } - if (*p != NUL) - n = FALSE; - - xfree(tofree); + n = var_exists(p); } rettv->vval.v_number = n; -- cgit