diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-04-06 18:56:57 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-04-08 07:28:46 -0400 |
commit | 1a1fe58f7e947abb3c6389a98b17ad54f18c353f (patch) | |
tree | 06452611bc576a155eb5707562c4854b09c25fbb /src/nvim/eval/funcs.c | |
parent | 48e80572855042ceb1d9191bc11f8b60275426eb (diff) | |
download | rneovim-1a1fe58f7e947abb3c6389a98b17ad54f18c353f.tar.gz rneovim-1a1fe58f7e947abb3c6389a98b17ad54f18c353f.tar.bz2 rneovim-1a1fe58f7e947abb3c6389a98b17ad54f18c353f.zip |
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
Diffstat (limited to 'src/nvim/eval/funcs.c')
-rw-r--r-- | src/nvim/eval/funcs.c | 25 |
1 files changed, 1 insertions, 24 deletions
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; |