Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
24851:528e605caece | 24852:3c8bd1d392d1 |
---|---|
4106 // If a following line starts with "->{" or "->X" advance to that | 4106 // If a following line starts with "->{" or "->X" advance to that |
4107 // line, so that a line break before "->" is allowed. | 4107 // line, so that a line break before "->" is allowed. |
4108 // Also if a following line starts with ".x". | 4108 // Also if a following line starts with ".x". |
4109 if (next != NULL && | 4109 if (next != NULL && |
4110 ((next[0] == '-' && next[1] == '>' | 4110 ((next[0] == '-' && next[1] == '>' |
4111 && (next[2] == '{' || ASCII_ISALPHA(next[2]))) | 4111 && (next[2] == '{' |
4112 || ASCII_ISALPHA(*skipwhite(next + 2)))) | |
4112 || (next[0] == '.' && eval_isdictc(next[1])))) | 4113 || (next[0] == '.' && eval_isdictc(next[1])))) |
4113 { | 4114 { |
4114 next = next_line_from_context(cctx, TRUE); | 4115 next = next_line_from_context(cctx, TRUE); |
4115 if (next == NULL) | 4116 if (next == NULL) |
4116 return FAIL; | 4117 return FAIL; |