Loading ...
Sorry, an error occurred while loading the content.

Patch 6.1.147 (extra)

Expand Messages
  • Bram Moolenaar
    Patch 6.1.147 (extra) Problem: MS-Windows: When a dialog has no default button, pressing Enter ends it anyway and all buttons are selected. Solution:
    Message 1 of 3 , Aug 4, 2002
    • 0 Attachment
      Patch 6.1.147 (extra)
      Problem: MS-Windows: When a dialog has no default button, pressing
      Enter ends it anyway and all buttons are selected.
      Solution: Don't end a dialog when there is no default button. Don't select
      all button when there is no default. (Vince Negri)
      Files: src/gui_w32.c


      *** ../vim61.146/src/gui_w32.c Sun Jun 9 20:34:00 2002
      --- src/gui_w32.c Sat Aug 3 21:50:26 2002
      ***************
      *** 2282,2288 ****
      * accept the default value, some reason this is what we get.
      */
      if (button == IDOK)
      ! EndDialog(hwnd, dialog_default_button);
      else
      EndDialog(hwnd, button - IDCANCEL);
      return TRUE;
      --- 2282,2291 ----
      * accept the default value, some reason this is what we get.
      */
      if (button == IDOK)
      ! {
      ! if (dialog_default_button > IDCANCEL)
      ! EndDialog(hwnd, dialog_default_button);
      ! }
      else
      EndDialog(hwnd, button - IDCANCEL);
      return TRUE;
      ***************
      *** 2422,2428 ****
      numButtons++;
      }
      if (dfltbutton >= numButtons)
      ! dfltbutton = 0;

      /* Allocate array to hold the width of each button */
      buttonWidths = (int *) lalloc(numButtons * sizeof(int), TRUE);
      --- 2425,2431 ----
      numButtons++;
      }
      if (dfltbutton >= numButtons)
      ! dfltbutton = -1;

      /* Allocate array to hold the width of each button */
      buttonWidths = (int *) lalloc(numButtons * sizeof(int), TRUE);
      ***************
      *** 2640,2646 ****
      if (vertical)
      {
      p = add_dialog_element(p,
      ! ((i == dfltbutton || dfltbutton < 0)
      ? BS_DEFPUSHBUTTON : BS_PUSHBUTTON) | WS_TABSTOP,
      PixelToDialogX(DLG_VERT_PADDING_X),
      PixelToDialogY(buttonYpos /* TBK */
      --- 2643,2649 ----
      if (vertical)
      {
      p = add_dialog_element(p,
      ! (i == dfltbutton
      ? BS_DEFPUSHBUTTON : BS_PUSHBUTTON) | WS_TABSTOP,
      PixelToDialogX(DLG_VERT_PADDING_X),
      PixelToDialogY(buttonYpos /* TBK */
      ***************
      *** 2652,2658 ****
      else
      {
      p = add_dialog_element(p,
      ! ((i == dfltbutton || dfltbutton < 0)
      ? BS_DEFPUSHBUTTON : BS_PUSHBUTTON) | WS_TABSTOP,
      PixelToDialogX(horizWidth + buttonPositions[i]),
      PixelToDialogY(buttonYpos), /* TBK */
      --- 2655,2661 ----
      else
      {
      p = add_dialog_element(p,
      ! (i == dfltbutton
      ? BS_DEFPUSHBUTTON : BS_PUSHBUTTON) | WS_TABSTOP,
      PixelToDialogX(horizWidth + buttonPositions[i]),
      PixelToDialogY(buttonYpos), /* TBK */
      *** ../vim61.146/src/version.c Sat Aug 3 21:22:36 2002
      --- src/version.c Sun Aug 4 20:54:08 2002
      ***************
      *** 608,609 ****
      --- 608,611 ----
      { /* Add new patch number below this line */
      + /**/
      + 147,
      /**/

      --
      From "know your smileys":
      C=}>;*{)) Drunk, devilish chef with a toupee in an updraft,
      a mustache, and a double chin

      /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
      /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\
      \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
      \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
    • Bram Moolenaar
      Patch 6.1.148 (extra) Problem: MS-Windows: ACL is not properly supported. Solution: Add an access() replacement that also works for ACL. (Mike Williams)
      Message 2 of 3 , Aug 4, 2002
      • 0 Attachment
        Patch 6.1.148 (extra)
        Problem: MS-Windows: ACL is not properly supported.
        Solution: Add an access() replacement that also works for ACL. (Mike
        Williams)
        Files: runtime/doc/editing.txt, src/os_win32.c


        *** ../vim61.147/runtime/doc/editing.txt Fri Mar 22 21:18:36 2002
        --- runtime/doc/editing.txt Mon Jun 10 20:54:44 2002
        ***************
        *** 1102,1109 ****
        Vim attempts to preserve the ACL info when writing a file. The backup file
        will get the ACL info of the original file.
        The ACL info is also used to check if a file is read-only (when opening the
        ! file). Not for MS-Windows though, because the ACL library functions are
        ! buggy.

        *write-device*
        When the file name is actually a device name, Vim will not make a backup (that
        --- 1102,1116 ----
        Vim attempts to preserve the ACL info when writing a file. The backup file
        will get the ACL info of the original file.
        The ACL info is also used to check if a file is read-only (when opening the
        ! file).
        !
        ! *read-only-share*
        ! When MS-Windows shares a drive on the network it can be marked as read-only.
        ! This means that even if the file read-only attribute is absent, and the ACL
        ! settings on NT network shared drives allow writing to the file, you can still
        ! not write to the file. Vim on Win32 platforms will detect read-only network
        ! drives and will mark the file as read-only. You will not be able to override
        ! it with |:write|.

        *write-device*
        When the file name is actually a device name, Vim will not make a backup (that
        *** ../vim61.147/src/os_win32.c Wed May 15 22:00:04 2002
        --- src/os_win32.c Sun Aug 4 20:50:41 2002
        ***************
        *** 4012,4024 ****
        }

        /*
        ! * mch_access() was used to support ACLs under Windows NT/2K/XP(?).
        ! * Unfortunately the ACL system functions are buggy, we couldn't make it work,
        ! * removed for now.
        * Returns 0 if file "n" has access rights according to "p", -1 otherwise.
        */
        int
        mch_access(char *n, int p)
        {
        ! return access(n, p);
        }
        --- 4020,4042 ----
        }

        /*
        ! * mch_access() extends access() to do more detailed check on network drives.
        * Returns 0 if file "n" has access rights according to "p", -1 otherwise.
        */
        int
        mch_access(char *n, int p)
        {
        ! HANDLE hFile;
        ! DWORD am;
        !
        ! /* Trying to open the file for the required access does ACL, read-only
        ! * network share, and file attribute checks.
        ! */
        ! am = ((p & W_OK) ? GENERIC_WRITE : 0)
        ! | ((p & R_OK) ? GENERIC_READ : 0);
        ! hFile = CreateFile(n, am, 0, NULL, OPEN_EXISTING, 0, NULL);
        ! if (hFile == INVALID_HANDLE_VALUE)
        ! return -1;
        ! CloseHandle(hFile);
        ! return 0;
        }
        *** ../vim61.147/src/version.c Sun Aug 4 20:56:30 2002
        --- src/version.c Sun Aug 4 21:00:31 2002
        ***************
        *** 608,609 ****
        --- 608,611 ----
        { /* Add new patch number below this line */
        + /**/
        + 148,
        /**/

        --
        From "know your smileys":
        <|-) Chinese
        <|-( Chinese and doesn't like these kind of jokes

        /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
        /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\
        \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
        \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
      • Bram Moolenaar
        ... Obviously the title of this message was wrong. Sorry! -- hundred-and-one symptoms of being an internet addict: 92. It takes you two hours to check all 14
        Message 3 of 3 , Aug 4, 2002
        • 0 Attachment
          > Patch 6.1.148 (extra)
          > Problem: MS-Windows: ACL is not properly supported.
          > Solution: Add an access() replacement that also works for ACL. (Mike
          > Williams)
          > Files: runtime/doc/editing.txt, src/os_win32.c

          Obviously the title of this message was wrong. Sorry!

          --
          hundred-and-one symptoms of being an internet addict:
          92. It takes you two hours to check all 14 of your mailboxes.

          /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
          /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\
          \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
          \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
        Your message has been successfully submitted and would be delivered to recipients shortly.