comparison src/ex_getln.c @ 481:66080ac5dab7 v7.0130

updated for version 7.0130
author vimboss
date Mon, 15 Aug 2005 21:41:48 +0000
parents bf5ba8a0cdee
children 52e76e2b5b65
comparison
equal deleted inserted replaced
480:bf5ba8a0cdee 481:66080ac5dab7
1645 changed_cline_bef_curs(); 1645 changed_cline_bef_curs();
1646 update_topline(); 1646 update_topline();
1647 1647
1648 if (i != 0) 1648 if (i != 0)
1649 { 1649 {
1650 pos_T save_pos = curwin->w_cursor;
1651
1650 /* 1652 /*
1651 * First move cursor to end of match, then to start. This 1653 * First move cursor to end of match, then to start. This
1652 * moves the whole match onto the screen when 'nowrap' is set. 1654 * moves the whole match onto the screen when 'nowrap' is set.
1653 */ 1655 */
1654 i = curwin->w_cursor.col;
1655 curwin->w_cursor.lnum += search_match_lines; 1656 curwin->w_cursor.lnum += search_match_lines;
1656 curwin->w_cursor.col = search_match_endcol; 1657 curwin->w_cursor.col = search_match_endcol;
1658 if (curwin->w_cursor.lnum > curbuf->b_ml.ml_line_count)
1659 {
1660 curwin->w_cursor.lnum = curbuf->b_ml.ml_line_count;
1661 coladvance((colnr_T)MAXCOL);
1662 }
1657 validate_cursor(); 1663 validate_cursor();
1658 curwin->w_cursor.lnum -= search_match_lines; 1664 curwin->w_cursor = save_pos;
1659 curwin->w_cursor.col = i;
1660 } 1665 }
1661 validate_cursor(); 1666 validate_cursor();
1662 1667
1663 save_cmdline(&save_ccline); 1668 save_cmdline(&save_ccline);
1664 update_screen(NOT_VALID); 1669 update_screen(NOT_VALID);