File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4769,9 +4769,11 @@ nv_percent(cmdarg_T *cap)
47694769 {
47704770 cap -> oap -> motion_type = MLINE ;
47714771 setpcmark ();
4772- // Round up, so CTRL-G will give same value. Watch out for a
4773- // large line count, the line number must not go negative!
4774- if (curbuf -> b_ml .ml_line_count > 1000000 )
4772+ // Round up, so 'normal 100%' always jumps at the line line.
4773+ // Beyond 21474836 lines, (ml_line_count * 100 + 99) would
4774+ // overflow on 32-bits, so use a formula with less accuracy
4775+ // to avoid overflows.
4776+ if (curbuf -> b_ml .ml_line_count >= 21474836 )
47754777 curwin -> w_cursor .lnum = (curbuf -> b_ml .ml_line_count + 99L )
47764778 / 100L * cap -> count0 ;
47774779 else
Original file line number Diff line number Diff line change @@ -750,6 +750,8 @@ static char *(features[]) =
750750
751751static int included_patches [] =
752752{ /* Add new patch number below this line */
753+ /**/
754+ 2547 ,
753755/**/
754756 2546 ,
755757/**/
You can’t perform that action at this time.
0 commit comments