diff options
Diffstat (limited to 'data/vim/patches/8.1.1026')
-rw-r--r-- | data/vim/patches/8.1.1026 | 169 |
1 files changed, 169 insertions, 0 deletions
diff --git a/data/vim/patches/8.1.1026 b/data/vim/patches/8.1.1026 new file mode 100644 index 000000000..00eddb1b3 --- /dev/null +++ b/data/vim/patches/8.1.1026 @@ -0,0 +1,169 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.1026 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.1026 +Problem: Unused condition. (Coverity) +Solution: Remove the condition. Also remove unused #define. +Files: src/move.c + + +*** ../vim-8.1.1025/src/move.c 2019-01-31 18:26:05.738803509 +0100 +--- src/move.c 2019-03-20 21:21:50.291049890 +0100 +*************** +*** 2574,2580 **** + return; + } + +- /* #define KEEP_SCREEN_LINE */ + /* + * Scroll 'scroll' lines up or down. + */ +--- 2574,2579 ---- +*************** +*** 2628,2641 **** + curwin->w_topfill = diff_check_fill(curwin, curwin->w_topline); + #endif + +- #ifndef KEEP_SCREEN_LINE + if (curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count) + { + ++curwin->w_cursor.lnum; + curwin->w_valid &= + ~(VALID_VIRTCOL|VALID_CHEIGHT|VALID_WCOL); + } +- #endif + } + curwin->w_valid &= ~(VALID_CROW|VALID_WROW); + scrolled += i; +--- 2627,2638 ---- +*************** +*** 2666,2672 **** + } + } + +- #ifndef KEEP_SCREEN_LINE + /* + * When hit bottom of the file: move cursor down. + */ +--- 2663,2668 ---- +*************** +*** 2688,2708 **** + curwin->w_cursor.lnum += n; + check_cursor_lnum(); + } +- #else +- /* try to put the cursor in the same screen line */ +- while ((curwin->w_cursor.lnum < curwin->w_topline || scrolled > 0) +- && curwin->w_cursor.lnum < curwin->w_botline - 1) +- { +- scrolled -= plines(curwin->w_cursor.lnum); +- if (scrolled < 0 && curwin->w_cursor.lnum >= curwin->w_topline) +- break; +- # ifdef FEAT_FOLDING +- (void)hasFolding(curwin->w_cursor.lnum, NULL, +- &curwin->w_cursor.lnum); +- # endif +- ++curwin->w_cursor.lnum; +- } +- #endif + } + else + { +--- 2684,2689 ---- +*************** +*** 2715,2722 **** + if (curwin->w_topfill < diff_check_fill(curwin, curwin->w_topline)) + { + i = 1; +! if (--n < 0 && scrolled > 0) +! break; + ++curwin->w_topfill; + } + else +--- 2696,2702 ---- + if (curwin->w_topfill < diff_check_fill(curwin, curwin->w_topline)) + { + i = 1; +! --n; + ++curwin->w_topfill; + } + else +*************** +*** 2737,2751 **** + curwin->w_valid &= ~(VALID_CROW|VALID_WROW| + VALID_BOTLINE|VALID_BOTLINE_AP); + scrolled += i; +- #ifndef KEEP_SCREEN_LINE + if (curwin->w_cursor.lnum > 1) + { + --curwin->w_cursor.lnum; + curwin->w_valid &= ~(VALID_VIRTCOL|VALID_CHEIGHT|VALID_WCOL); + } +- #endif + } +! #ifndef KEEP_SCREEN_LINE + /* + * When hit top of the file: move cursor up. + */ +--- 2717,2729 ---- + curwin->w_valid &= ~(VALID_CROW|VALID_WROW| + VALID_BOTLINE|VALID_BOTLINE_AP); + scrolled += i; + if (curwin->w_cursor.lnum > 1) + { + --curwin->w_cursor.lnum; + curwin->w_valid &= ~(VALID_VIRTCOL|VALID_CHEIGHT|VALID_WCOL); + } + } +! + /* + * When hit top of the file: move cursor up. + */ +*************** +*** 2768,2788 **** + # endif + curwin->w_cursor.lnum -= n; + } +- #else +- /* try to put the cursor in the same screen line */ +- scrolled += n; /* move cursor when topline is 1 */ +- while (curwin->w_cursor.lnum > curwin->w_topline +- && (scrolled > 0 || curwin->w_cursor.lnum >= curwin->w_botline)) +- { +- scrolled -= plines(curwin->w_cursor.lnum - 1); +- if (scrolled < 0 && curwin->w_cursor.lnum < curwin->w_botline) +- break; +- --curwin->w_cursor.lnum; +- # ifdef FEAT_FOLDING +- foldAdjustCursor(); +- # endif +- } +- #endif + } + # ifdef FEAT_FOLDING + /* Move cursor to first line of closed fold. */ +--- 2746,2751 ---- +*** ../vim-8.1.1025/src/version.c 2019-03-20 21:18:31.237018906 +0100 +--- src/version.c 2019-03-20 21:22:35.106627485 +0100 +*************** +*** 781,782 **** +--- 781,784 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 1026, + /**/ + +-- +From "know your smileys": + <<<:-{ Worf (Never smiles anyways, so he's a bad smiley) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |