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 / 6.1.435 < prev    next >
Encoding:
Internet Message Format  |  2003-03-31  |  2.2 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.1.435
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.1.435
  11. Problem:    ":winsize x" resizes the Vim window to the minimal size. (Andrew
  12.         Pimlott)
  13. Solution:   Give an error message for wrong arguments of ":winsize" and
  14.         ":winpos".
  15. Files:        src/ex_docmd.c
  16.  
  17.  
  18. *** ../vim61.434/src/ex_docmd.c    Mon Mar 31 22:05:39 2003
  19. --- src/ex_docmd.c    Tue Apr  1 20:45:15 2003
  20. ***************
  21. *** 6232,6242 ****
  22.   {
  23.       int        w, h;
  24.       char_u    *arg = eap->arg;
  25.   
  26.       w = getdigits(&arg);
  27.       arg = skipwhite(arg);
  28.       h = getdigits(&arg);
  29. !     set_shellsize(w, h, TRUE);
  30.   }
  31.   
  32.   #ifdef FEAT_WINDOWS
  33. --- 6232,6247 ----
  34.   {
  35.       int        w, h;
  36.       char_u    *arg = eap->arg;
  37. +     char_u    *p;
  38.   
  39.       w = getdigits(&arg);
  40.       arg = skipwhite(arg);
  41. +     p = arg;
  42.       h = getdigits(&arg);
  43. !     if (*p != NUL && *arg == NUL)
  44. !     set_shellsize(w, h, TRUE);
  45. !     else
  46. !     EMSG(_("E465: :winsize requires two number arguments"));
  47.   }
  48.   
  49.   #ifdef FEAT_WINDOWS
  50. ***************
  51. *** 6280,6285 ****
  52. --- 6285,6291 ----
  53.   {
  54.       int        x, y;
  55.       char_u    *arg = eap->arg;
  56. +     char_u    *p;
  57.   
  58.       if (*arg == NUL)
  59.       {
  60. ***************
  61. *** 6297,6303 ****
  62. --- 6303,6315 ----
  63.       {
  64.       x = getdigits(&arg);
  65.       arg = skipwhite(arg);
  66. +     p = arg;
  67.       y = getdigits(&arg);
  68. +     if (*p == NUL || *arg != NUL)
  69. +     {
  70. +         EMSG(_("E466: :winpos requires two number arguments"));
  71. +         return;
  72. +     }
  73.   # ifdef FEAT_GUI
  74.       if (gui.in_use)
  75.           gui_mch_set_winpos(x, y);
  76. *** ../vim61.434/src/version.c    Mon Mar 31 22:44:28 2003
  77. --- src/version.c    Tue Apr  1 22:07:46 2003
  78. ***************
  79. *** 613,614 ****
  80. --- 613,616 ----
  81.   {   /* Add new patch number below this line */
  82. + /**/
  83. +     435,
  84.   /**/
  85.  
  86. -- 
  87. Experience is what you get when you don't get what you want.
  88.  
  89.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  90. ///          Creator of Vim - Vi IMproved -- http://www.Vim.org          \\\
  91. \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
  92.  \\\     Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///
  93.