home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / old / 5.5.050 < prev    next >
Encoding:
Internet Message Format  |  1999-12-03  |  6.3 KB

  1. To: vim-dev@vim.org
  2. Subject: patch 5.5.050
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. ------------
  6.  
  7. Patch 5.5.050
  8. Problem:    "z+" and "z^" commands are missing.
  9. Solution:   Implemented "z+" and "z^".
  10. Files:        src/normal.c, runtime/doc/scroll.txt, runtime/doc/index.txt
  11.  
  12.  
  13. *** ../vim-5.5.49/src/normal.c    Sat Oct  2 16:00:01 1999
  14. --- src/normal.c    Sun Oct 31 13:40:06 1999
  15. ***************
  16. *** 709,715 ****
  17.       break;
  18.   
  19.   /*
  20. !  * Cursor motions
  21.    */
  22.       case 'G':
  23.       nv_goto(oap, ca.count0 == 0 ? (long)curbuf->b_ml.ml_line_count
  24. --- 709,715 ----
  25.       break;
  26.   
  27.   /*
  28. !  * 3. Cursor motions
  29.    */
  30.       case 'G':
  31.       nv_goto(oap, ca.count0 == 0 ? (long)curbuf->b_ml.ml_line_count
  32. ***************
  33. *** 3411,3432 ****
  34.   
  35.       switch (nchar)
  36.       {
  37. !     case NL:            /* put curwin->w_cursor at top of screen */
  38.       case CR:
  39.       beginline(BL_WHITE | BL_FIX);
  40.       /* FALLTHROUGH */
  41.       case 't':
  42.       scroll_cursor_top(0, TRUE);
  43.       break;
  44.   
  45. !     case '.':        /* put curwin->w_cursor in middle of screen */
  46.       beginline(BL_WHITE | BL_FIX);
  47.       /* FALLTHROUGH */
  48.       case 'z':
  49.       scroll_cursor_halfway(TRUE);
  50.       break;
  51.   
  52. !     case '-':        /* put curwin->w_cursor at bottom of screen */
  53.       beginline(BL_WHITE | BL_FIX);
  54.       /* FALLTHROUGH */
  55.       case 'b':
  56. --- 3411,3463 ----
  57.   
  58.       switch (nchar)
  59.       {
  60. !     /* put cursor at top of screen */
  61. !     case '+':
  62. !     case K_KPLUS:
  63. !     if (cap->count0 == 0)
  64. !     {
  65. !         /* No count given: put cursor at the line below screen */
  66. !         validate_botline();    /* using w_botline, make sure it's valid */
  67. !         if (curwin->w_botline > curbuf->b_ml.ml_line_count)
  68. !         curwin->w_cursor.lnum = curbuf->b_ml.ml_line_count;
  69. !         else
  70. !         curwin->w_cursor.lnum = curwin->w_botline;
  71. !     }
  72. !     /* FALLTHROUGH */
  73. !     case NL:
  74.       case CR:
  75. +     case K_KENTER:
  76.       beginline(BL_WHITE | BL_FIX);
  77.       /* FALLTHROUGH */
  78.       case 't':
  79.       scroll_cursor_top(0, TRUE);
  80.       break;
  81.   
  82. !     /* put cursor in middle of screen */
  83. !     case '.':
  84.       beginline(BL_WHITE | BL_FIX);
  85.       /* FALLTHROUGH */
  86.       case 'z':
  87.       scroll_cursor_halfway(TRUE);
  88.       break;
  89.   
  90. !     /* put cursor at bottom of screen */
  91. !     case '^':
  92. !     /* Strange Vi behavior: <count>z^ finds line at top of window when
  93. !      * <count> is at bottom of window, and puts that one at bottom of
  94. !      * window. */
  95. !     if (cap->count0 != 0)
  96. !     {
  97. !         scroll_cursor_bot(0, TRUE);
  98. !         curwin->w_cursor.lnum = curwin->w_topline;
  99. !     }
  100. !     else if (curwin->w_topline == 1)
  101. !         curwin->w_cursor.lnum = 1;
  102. !     else
  103. !         curwin->w_cursor.lnum = curwin->w_topline - 1;
  104. !     /* FALLTHROUGH */
  105. !     case '-':
  106. !     case K_KMINUS:
  107.       beginline(BL_WHITE | BL_FIX);
  108.       /* FALLTHROUGH */
  109.       case 'b':
  110. *** ../vim-5.5.49/runtime/doc/scroll.txt    Wed Sep 22 10:06:42 1999
  111. --- runtime/doc/scroll.txt    Sun Oct 31 13:38:08 1999
  112. ***************
  113. *** 1,4 ****
  114. ! *scroll.txt*    For Vim version 5.5.  Last change: 1999 Sep 19
  115.   
  116.   
  117.             VIM REFERENCE MANUAL    by Bram Moolenaar
  118. --- 1,4 ----
  119. ! *scroll.txt*    For Vim version 5.5.  Last change: 1999 Oct 31
  120.   
  121.   
  122.             VIM REFERENCE MANUAL    by Bram Moolenaar
  123. ***************
  124. *** 95,100 ****
  125. --- 95,106 ----
  126.   zt            Like "z<CR>", but leave the cursor in the same
  127.               column.  {not in Vi}
  128.   
  129. +                             *z+*
  130. + z+            Without [count]: Redraw with the line just above the
  131. +             window at the bottom of the window.  Put the cursor in
  132. +             that line, at the first non-blank in the line.
  133. +             With [count]: just like "z<CR>".
  134.                               *zN<CR>*
  135.   z{height}<CR>        Redraw, make window {height} lines tall.  This is
  136.               useful to make the number of lines small when screen
  137. ***************
  138. *** 120,125 ****
  139. --- 126,141 ----
  140.   zb            Like "z-", but leave the cursor in the same column.
  141.               {not in Vi}
  142.   
  143. +                             *z^*
  144. + z^            Without [count]: Redraw with the line just above the
  145. +             window at the bottom of the window.  Put the cursor in
  146. +             that line, at the first non-blank in the line.
  147. +             With [count]: First scroll the text to put the [count]
  148. +             line at the bottom of the window, then redraw with the
  149. +             line which is now at the top of the window at the
  150. +             bottom of the window.  Put the cursor in that line, at
  151. +             the first non-blank in the line.
  152.   ==============================================================================
  153.   4. Scrolling horizontally                *scroll-horizontal*
  154.   
  155. *** ../vim-5.5.49/runtime/doc/index.txt    Wed Sep 22 10:06:41 1999
  156. --- runtime/doc/index.txt    Sun Oct 31 13:07:07 1999
  157. ***************
  158. *** 1,4 ****
  159. ! *index.txt*     For Vim version 5.5.  Last change: 1999 Sep 14
  160.   
  161.   
  162.             VIM REFERENCE MANUAL    by Bram Moolenaar
  163. --- 1,4 ----
  164. ! *index.txt*     For Vim version 5.5.  Last change: 1999 Oct 31
  165.   
  166.   
  167.             VIM REFERENCE MANUAL    by Bram Moolenaar
  168. ***************
  169. *** 372,381 ****
  170.   |z<CR>|        z<CR>           redraw, cursor line to top of window,
  171.                      cursor on first non-blank
  172.   |zN<CR>|    z{height}<CR>       redraw, make window {height} lines high
  173. ! |z.|        z.           redraw, cursor line to center of window,
  174. !                    cursor on first non-blank
  175.   |z-|        z-           redraw, cursor line at bottom of window,
  176.                      cursor on first non-blank
  177.   |zb|        zb           redraw, cursor line at bottom of window
  178.   |ze|        ze           when 'wrap' off scroll horizontally to
  179.                      position the cursor at the end (right side)
  180. --- 372,385 ----
  181.   |z<CR>|        z<CR>           redraw, cursor line to top of window,
  182.                      cursor on first non-blank
  183.   |zN<CR>|    z{height}<CR>       redraw, make window {height} lines high
  184. ! |z+|        z+           cursor on line N (default line below
  185. !                    window), otherwise like "z<CR>"
  186.   |z-|        z-           redraw, cursor line at bottom of window,
  187.                      cursor on first non-blank
  188. + |z.|        z.           redraw, cursor line to center of window,
  189. +                    cursor on first non-blank
  190. + |z^|        z^           cursor on line N (default line above
  191. +                    window), otherwise like "z-"
  192.   |zb|        zb           redraw, cursor line at bottom of window
  193.   |ze|        ze           when 'wrap' off scroll horizontally to
  194.                      position the cursor at the end (right side)
  195. *** ../vim-5.5.49/src/version.c    Sat Dec  4 14:46:04 1999
  196. --- src/version.c    Sat Dec  4 14:47:46 1999
  197. ***************
  198. *** 420,420 ****
  199. --- 420,421 ----
  200.   {   /* Add new patch number below this line */
  201. +     50,
  202.  
  203. -- 
  204. hundred-and-one symptoms of being an internet addict:
  205. 235. You start naming your kids Fortran, COBOL, Algol, and Pascal.
  206.  
  207. --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\--
  208.   \ \    www.vim.org/iccf      www.moolenaar.net       www.vim.org    / /
  209.