Mercurial > vim
comparison src/ex_docmd.c @ 20023:c85d4e173cc9 v8.2.0567
patch 8.2.0567: Vim9: cannot put comments halfway expressions
Commit: https://github.com/vim/vim/commit/2c330432cfb12181c61d698b5459bfd73d2610df
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Apr 13 14:41:35 2020 +0200
patch 8.2.0567: Vim9: cannot put comments halfway expressions
Problem: Vim9: cannot put comments halfway expressions.
Solution: Support # comments in many places.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 13 Apr 2020 14:45:04 +0200 |
parents | 6eb3c91d9875 |
children | 23a4aef4f923 |
comparison
equal
deleted
inserted
replaced
20022:fb9a66d81a39 | 20023:c85d4e173cc9 |
---|---|
4762 } | 4762 } |
4763 | 4763 |
4764 int | 4764 int |
4765 ends_excmd(int c) | 4765 ends_excmd(int c) |
4766 { | 4766 { |
4767 if (c == '#') | |
4768 // TODO: should check for preceding white space | |
4769 return in_vim9script(); | |
4767 return (c == NUL || c == '|' || c == '"' || c == '\n'); | 4770 return (c == NUL || c == '|' || c == '"' || c == '\n'); |
4768 } | 4771 } |
4769 | 4772 |
4770 #if defined(FEAT_SYN_HL) || defined(FEAT_SEARCH_EXTRA) || defined(FEAT_EVAL) \ | 4773 #if defined(FEAT_SYN_HL) || defined(FEAT_SEARCH_EXTRA) || defined(FEAT_EVAL) \ |
4771 || defined(PROTO) | 4774 || defined(PROTO) |