diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-01-02 14:57:08 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-01-02 14:57:08 +0100 |
commit | 54b2bfa399017ebae76ed62f21578261d1b55c1f (patch) | |
tree | 30c05c78ca2efbe24a73064e337a7ba48c30868d /src/ops.c | |
parent | ded2782783f352201ac0b05c6dbe4831adb4a58b (diff) | |
download | vim-git-54b2bfa399017ebae76ed62f21578261d1b55c1f.tar.gz |
patch 8.0.0136v8.0.0136
Problem: When using indent folding and changing indent the wrong fold is
opened. (Jonathan Fudger)
Solution: Open the fold under the cursor a bit later. (Christian Brabandt)
Diffstat (limited to 'src/ops.c')
-rw-r--r-- | src/ops.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -259,11 +259,6 @@ op_shift(oparg_T *oap, int curs_top, int amount) } changed_lines(oap->start.lnum, 0, oap->end.lnum + 1, 0L); -#ifdef FEAT_FOLDING - /* The cursor line is not in a closed fold */ - foldOpenCursor(); -#endif - if (oap->block_mode) { curwin->w_cursor.lnum = oap->start.lnum; @@ -277,6 +272,12 @@ op_shift(oparg_T *oap, int curs_top, int amount) else --curwin->w_cursor.lnum; /* put cursor on last line, for ":>" */ +#ifdef FEAT_FOLDING + /* The cursor line is not in a closed fold */ + foldOpenCursor(); +#endif + + if (oap->line_count > p_report) { if (oap->op_type == OP_RSHIFT) |