feat(api): add filetype option nvim_get_option_value

- Also adjust the expr-mapping behaviour so normal commands and text
  changes are allowed in internal dummy buffers.
This commit is contained in:
Lewis Russell
2023-03-15 23:30:14 +00:00
parent 84027f7515
commit e1db0e35e4
10 changed files with 95 additions and 11 deletions

View File

@@ -1245,7 +1245,9 @@ bool edit(int cmdchar, bool startln, long count)
// Don't allow changes in the buffer while editing the cmdline. The
// caller of getcmdline() may get confused.
// Don't allow recursive insert mode when busy with completion.
if (textlock != 0 || ins_compl_active() || compl_busy || pum_visible()) {
// Allow in dummy buffers since they are only used internally
if (textlock != 0 || ins_compl_active() || compl_busy || pum_visible()
|| expr_map_locked()) {
emsg(_(e_textlock));
return false;
}