Mercurial > vim
comparison src/vim9compile.c @ 21335:af3663df42bf v8.2.1218
patch 8.2.1218: Vim9: cannot use 'text'->func()
Commit: https://github.com/vim/vim/commit/3d48e25dcb661eb09ccdaa73d4e2559201ff2eb1
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jul 15 14:15:52 2020 +0200
patch 8.2.1218: Vim9: cannot use 'text'->func()
Problem: Vim9: cannot use 'text'->func().
Solution: Recognize string at start of command.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 15 Jul 2020 14:30:04 +0200 |
parents | 60011b87aae1 |
children | 5dd4cbc1e9e6 |
comparison
equal
deleted
inserted
replaced
21334:d7dc824cbbe5 | 21335:af3663df42bf |
---|---|
7046 } | 7046 } |
7047 } | 7047 } |
7048 | 7048 |
7049 /* | 7049 /* |
7050 * COMMAND after range | 7050 * COMMAND after range |
7051 * 'text'->func() should not be confused with 'a mark | |
7051 */ | 7052 */ |
7052 cmd = ea.cmd; | 7053 cmd = ea.cmd; |
7053 ea.cmd = skip_range(ea.cmd, NULL); | 7054 if (*cmd != '\'') |
7054 if (ea.cmd > cmd && !starts_with_colon) | 7055 { |
7055 { | 7056 ea.cmd = skip_range(ea.cmd, NULL); |
7056 emsg(_(e_colon_required)); | 7057 if (ea.cmd > cmd && !starts_with_colon) |
7057 goto erret; | 7058 { |
7059 emsg(_(e_colon_required)); | |
7060 goto erret; | |
7061 } | |
7058 } | 7062 } |
7059 p = find_ex_command(&ea, NULL, starts_with_colon ? NULL | 7063 p = find_ex_command(&ea, NULL, starts_with_colon ? NULL |
7060 : (void *(*)(char_u *, size_t, cctx_T *))lookup_local, | 7064 : (void *(*)(char_u *, size_t, cctx_T *))lookup_local, |
7061 &cctx); | 7065 &cctx); |
7062 | 7066 |