char_u *swp;
if (*eap->cmd == '&'
- || *eap->cmd == '$'
+ || (eap->cmd[0] == '$'
+ && eap->cmd[1] != '\'' && eap->cmd[1] != '"')
|| (eap->cmd[0] == '@'
&& (valid_yank_reg(eap->cmd[1], FALSE)
|| eap->cmd[1] == '@')))
// "'string'->func()" is an expression.
|| *eap->cmd == '\''
// '"string"->func()' is an expression.
- || (eap->cmd[0] == '0' && eap->cmd[1] == 'z')
- // '"string"->func()' is an expression.
|| *eap->cmd == '"'
+ // '$"string"->func()' is an expression.
+ // "$'string'->func()" is an expression.
+ || (eap->cmd[0] == '$'
+ && (eap->cmd[1] == '\'' || eap->cmd[1] == '"'))
+ // '0z1234->func()' is an expression.
+ || (eap->cmd[0] == '0' && eap->cmd[1] == 'z')
// "g:varname" is an expression.
|| eap->cmd[1] == ':'
)
setline(1, ['first', 'last'])
'second'->append(1)
"third"->append(2)
- assert_equal(['first', 'second', 'third', 'last'], getline(1, '$'))
+ $"fourth"->append(3)
+ $'fifth'->append(4)
+ assert_equal(['first', 'second', 'third', 'fourth', 'fifth', 'last'], getline(1, '$'))
bwipe!
var bufnr = bufnr()