Mercurial > vim
comparison src/ex_docmd.c @ 21487:5c92877092f9 v8.2.1294
patch 8.2.1294: Vim9: error when using vim9script in TextYankPost
Commit: https://github.com/vim/vim/commit/37394ff75270877a032422abcd079a6732a29730
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jul 25 19:38:18 2020 +0200
patch 8.2.1294: Vim9: error when using vim9script in TextYankPost
Problem: Vim9: error when using vim9script in TextYankPost.
Solution: Use EX_LOCKOK instead of the EX_CMDWIN flag for command that can
be used when text is locked. (closes #6529)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 25 Jul 2020 19:45:05 +0200 |
parents | eec2d2120cde |
children | 7449921216bc |
comparison
equal
deleted
inserted
replaced
21486:25f16992d158 | 21487:5c92877092f9 |
---|---|
2059 // Command not allowed in non-'modifiable' buffer | 2059 // Command not allowed in non-'modifiable' buffer |
2060 errormsg = _(e_modifiable); | 2060 errormsg = _(e_modifiable); |
2061 goto doend; | 2061 goto doend; |
2062 } | 2062 } |
2063 | 2063 |
2064 if (text_locked() && !(ea.argt & EX_CMDWIN) | 2064 if (!IS_USER_CMDIDX(ea.cmdidx)) |
2065 && !IS_USER_CMDIDX(ea.cmdidx)) | 2065 { |
2066 { | 2066 #ifdef FEAT_CMDWIN |
2067 // Command not allowed when editing the command line. | 2067 if (cmdwin_type != 0 && !(ea.argt & EX_CMDWIN)) |
2068 errormsg = _(get_text_locked_msg()); | 2068 { |
2069 goto doend; | 2069 // Command not allowed in the command line window |
2070 errormsg = _(e_cmdwin); | |
2071 goto doend; | |
2072 } | |
2073 #endif | |
2074 if (text_locked() && !(ea.argt & EX_LOCK_OK)) | |
2075 { | |
2076 // Command not allowed when text is locked | |
2077 errormsg = _(get_text_locked_msg()); | |
2078 goto doend; | |
2079 } | |
2070 } | 2080 } |
2071 | 2081 |
2072 // Disallow editing another buffer when "curbuf_lock" is set. | 2082 // Disallow editing another buffer when "curbuf_lock" is set. |
2073 // Do allow ":checktime" (it is postponed). | 2083 // Do allow ":checktime" (it is postponed). |
2074 // Do allow ":edit" (check for an argument later). | 2084 // Do allow ":edit" (check for an argument later). |