diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-11-16 13:50:25 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-11-16 13:50:25 +0100 |
commit | f4a1d1c0542df151bc59ac3b798ed198b5c71ccc (patch) | |
tree | 9f6051c5c5e75c7f113a923f7888f0f272ddee9e /src/indent.c | |
parent | ab85ca4e6a40b2998db7b00896505486f5c16b41 (diff) | |
download | vim-git-f4a1d1c0542df151bc59ac3b798ed198b5c71ccc.tar.gz |
patch 8.1.2302: :lockmarks does not work for '[ and ']v8.1.2302
Problem: :lockmarks does not work for '[ and '].
Solution: save and restore '[ and '] marks. (James McCoy, closes #5222)
Diffstat (limited to 'src/indent.c')
-rw-r--r-- | src/indent.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/indent.c b/src/indent.c index 755c3a9e4..8d574c8a7 100644 --- a/src/indent.c +++ b/src/indent.c @@ -1001,9 +1001,12 @@ op_reindent(oparg_T *oap, int (*how)(void)) smsg(NGETTEXT("%ld line indented ", "%ld lines indented ", i), i); } - // set '[ and '] marks - curbuf->b_op_start = oap->start; - curbuf->b_op_end = oap->end; + if (!cmdmod.lockmarks) + { + // set '[ and '] marks + curbuf->b_op_start = oap->start; + curbuf->b_op_end = oap->end; + } } #endif // defined(FEAT_LISP) || defined(FEAT_CINDENT) |