comparison src/eval.c @ 24852:3c8bd1d392d1 v8.2.2964

patch 8.2.2964: Vim9: hang when using space after -> Commit: https://github.com/vim/vim/commit/a733042b124357225e4081e10ef28591236c6077 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jun 8 20:46:45 2021 +0200 patch 8.2.2964: Vim9: hang when using space after -> Problem: Vim9: hang when using space after ->. (Naohiro Ono) Solution: Skip over white space to find the function name. (closes https://github.com/vim/vim/issues/8341)
author Bram Moolenaar <Bram@vim.org>
date Tue, 08 Jun 2021 21:00:03 +0200
parents fcab26a7fd4d
children 594edca79708
comparison
equal deleted inserted replaced
24851:528e605caece 24852:3c8bd1d392d1
5784 // When at the end of the line and ".name" or "->{" or "->X" follows in 5784 // When at the end of the line and ".name" or "->{" or "->X" follows in
5785 // the next line then consume the line break. 5785 // the next line then consume the line break.
5786 p = eval_next_non_blank(*arg, evalarg, &getnext); 5786 p = eval_next_non_blank(*arg, evalarg, &getnext);
5787 if (getnext 5787 if (getnext
5788 && ((rettv->v_type == VAR_DICT && *p == '.' && eval_isdictc(p[1])) 5788 && ((rettv->v_type == VAR_DICT && *p == '.' && eval_isdictc(p[1]))
5789 || (p[0] == '-' && p[1] == '>' 5789 || (p[0] == '-' && p[1] == '>' && (p[2] == '{'
5790 && (p[2] == '{' || ASCII_ISALPHA(p[2]))))) 5790 || ASCII_ISALPHA(in_vim9script() ? *skipwhite(p + 2)
5791 : p[2])))))
5791 { 5792 {
5792 *arg = eval_next_line(evalarg); 5793 *arg = eval_next_line(evalarg);
5793 p = *arg; 5794 p = *arg;
5794 check_white = FALSE; 5795 check_white = FALSE;
5795 } 5796 }