diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2021-07-09 10:15:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-09 10:15:18 +0200 |
commit | 1c416892879de6b78038f2cc2f1487eff46abb60 (patch) | |
tree | 3895521bc907b7a0617940c21272ac7ee9f052da /src/nvim/ex_cmds.c | |
parent | 27118c6eb3351b0df96e2514e8f3806108e50cf7 (diff) | |
parent | 9c93e6461c8c6ec2e8d3e73f506389ac7086d531 (diff) | |
download | rneovim-1c416892879de6b78038f2cc2f1487eff46abb60.tar.gz rneovim-1c416892879de6b78038f2cc2f1487eff46abb60.tar.bz2 rneovim-1c416892879de6b78038f2cc2f1487eff46abb60.zip |
Merge pull request #12971 from vigoux/decurbuf
Decrease reliance on curbuf in BUFEMPTY and `undo.c`
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r-- | src/nvim/ex_cmds.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index 3fb81dbd9f..0e7d7c2dc2 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -2607,7 +2607,7 @@ int do_ecmd( && (p_ur < 0 || curbuf->b_ml.ml_line_count <= p_ur)) { // Sync first so that this is a separate undo-able action. u_sync(false); - if (u_savecommon(0, curbuf->b_ml.ml_line_count + 1, 0, true) + if (u_savecommon(curbuf, 0, curbuf->b_ml.ml_line_count + 1, 0, true) == FAIL) { xfree(new_name); goto theend; @@ -5159,9 +5159,9 @@ void fix_help_buffer(void) // Set filetype to "help". if (STRCMP(curbuf->b_p_ft, "help") != 0) { - curbuf_lock++; + curbuf->b_ro_locked++; set_option_value("ft", 0L, "help", OPT_LOCAL); - curbuf_lock--; + curbuf->b_ro_locked--; } if (!syntax_present(curwin)) { |