@@ -851,41 +851,24 @@ do_move(linenr_T line1, linenr_T line2, linenr_T dest)
851851 * their final destination at the new text position -- webb
852852 */
853853 last_line = curbuf -> b_ml .ml_line_count ;
854- mark_adjust_nofold (line1 , line2 , last_line - line2 , 0L );
854+ mark_adjust (line1 , line2 , last_line - line2 , 0L );
855+ changed_lines (last_line - num_lines + 1 , 0 , last_line + 1 , num_lines );
855856 if (dest >= line2 )
856857 {
857- mark_adjust_nofold (line2 + 1 , dest , - num_lines , 0L );
858- #ifdef FEAT_FOLDING
859- win_T * win ;
860- tabpage_T * tp ;
861-
862- FOR_ALL_TAB_WINDOWS (tp , win ) {
863- if (win -> w_buffer == curbuf )
864- foldSwapRange (& win -> w_folds , line1 , line2 , dest + 1 ,
865- dest + num_lines );
866- }
867- #endif
858+ mark_adjust (line2 + 1 , dest , - num_lines , 0L );
868859 curbuf -> b_op_start .lnum = dest - num_lines + 1 ;
869860 curbuf -> b_op_end .lnum = dest ;
870861 }
871862 else
872863 {
873- mark_adjust_nofold (dest + 1 , line1 - 1 , num_lines , 0L );
874- #ifdef FEAT_FOLDING
875- win_T * win ;
876- tabpage_T * tp ;
877-
878- FOR_ALL_TAB_WINDOWS (tp , win ) {
879- if (win -> w_buffer == curbuf )
880- foldSwapRange (& win -> w_folds , dest + 1 , line1 - 1 , line1 , line2 );
881- }
882- #endif
864+ mark_adjust (dest + 1 , line1 - 1 , num_lines , 0L );
883865 curbuf -> b_op_start .lnum = dest + 1 ;
884866 curbuf -> b_op_end .lnum = dest + num_lines ;
885867 }
886868 curbuf -> b_op_start .col = curbuf -> b_op_end .col = 0 ;
887- mark_adjust_nofold (last_line - num_lines + 1 , last_line ,
869+ mark_adjust (last_line - num_lines + 1 , last_line ,
888870 - (last_line - dest - extra ), 0L );
871+ changed_lines (last_line - num_lines + 1 , 0 , last_line + 1 , - extra );
889872
890873 /*
891874 * Now we delete the original text -- webb
0 commit comments