Mercurial > vim
diff src/vim9compile.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 | adcd50a18236 |
children | c9ccb1976049 |
line wrap: on
line diff
--- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -4108,7 +4108,8 @@ compile_subscript( // Also if a following line starts with ".x". if (next != NULL && ((next[0] == '-' && next[1] == '>' - && (next[2] == '{' || ASCII_ISALPHA(next[2]))) + && (next[2] == '{' + || ASCII_ISALPHA(*skipwhite(next + 2)))) || (next[0] == '.' && eval_isdictc(next[1])))) { next = next_line_from_context(cctx, TRUE);