comparison src/ops.c @ 10486:99896ee0cac5 v8.0.0136

commit https://github.com/vim/vim/commit/54b2bfa399017ebae76ed62f21578261d1b55c1f Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jan 2 14:57:08 2017 +0100 patch 8.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)
author Christian Brabandt <cb@256bit.org>
date Mon, 02 Jan 2017 15:00:04 +0100
parents b2dbe79639a2
children 1e700d72561d
comparison
equal deleted inserted replaced
10485:145318e2eed4 10486:99896ee0cac5
257 } 257 }
258 ++curwin->w_cursor.lnum; 258 ++curwin->w_cursor.lnum;
259 } 259 }
260 260
261 changed_lines(oap->start.lnum, 0, oap->end.lnum + 1, 0L); 261 changed_lines(oap->start.lnum, 0, oap->end.lnum + 1, 0L);
262 if (oap->block_mode)
263 {
264 curwin->w_cursor.lnum = oap->start.lnum;
265 curwin->w_cursor.col = block_col;
266 }
267 else if (curs_top) /* put cursor on first line, for ">>" */
268 {
269 curwin->w_cursor.lnum = oap->start.lnum;
270 beginline(BL_SOL | BL_FIX); /* shift_line() may have set cursor.col */
271 }
272 else
273 --curwin->w_cursor.lnum; /* put cursor on last line, for ":>" */
274
262 #ifdef FEAT_FOLDING 275 #ifdef FEAT_FOLDING
263 /* The cursor line is not in a closed fold */ 276 /* The cursor line is not in a closed fold */
264 foldOpenCursor(); 277 foldOpenCursor();
265 #endif 278 #endif
266 279
267 if (oap->block_mode)
268 {
269 curwin->w_cursor.lnum = oap->start.lnum;
270 curwin->w_cursor.col = block_col;
271 }
272 else if (curs_top) /* put cursor on first line, for ">>" */
273 {
274 curwin->w_cursor.lnum = oap->start.lnum;
275 beginline(BL_SOL | BL_FIX); /* shift_line() may have set cursor.col */
276 }
277 else
278 --curwin->w_cursor.lnum; /* put cursor on last line, for ":>" */
279 280
280 if (oap->line_count > p_report) 281 if (oap->line_count > p_report)
281 { 282 {
282 if (oap->op_type == OP_RSHIFT) 283 if (oap->op_type == OP_RSHIFT)
283 s = (char_u *)">"; 284 s = (char_u *)">";