ClosestStorm / macvim

Automatically exported from code.google.com/p/macvim
0 stars 0 forks source link

Keyboard shortcuts do not work in modal "Do you want to save changes" dialog #400

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Steps to reproduce:

1. Open a new editing buffer
2. enter insert mode and type something
3. Hit Cmd-W or Cmd-Shift-W or click “File -> Close” or “File -> Close 
Window”
4. In the modal “Do you want to save changes” dialog, try hitting d (for 
“Don't Save”) or c (for “Cancel”) or s (for “Save”).

Expected result, and what I see instead:

I expect the corresponding button action to be executed. Instead, nothing 
happens. (Hitting Esc does work, though, and invokes the “Cancel” action)

Version of MacVim: “Custom Version 7.3 (64)” in the “About” dialog. 
Output of `:version`:

{{{
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jan  8 2012 22:47:34)
MacOS X (unix) version
Included patches: 1-244, 246-390 
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jan  8 2012 22:47:34)
MacOS X (unix) version
Included patches: 1-244, 246-390
Compiled by gthb@toodee.local
Normal version with MacVim GUI.  Features included (+) or not (-):
-arabic +autocmd +balloon_eval +browse +builtin_terms +byte_offset +cindent 
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments 
-conceal +cryptv -cscope +cursorbind
+cursorshape +dialog_con_gui +diff +digraphs +dnd -ebcdic -emacs_tags +eval 
+ex_extra +extra_search -farsi +file_in_path +find_in_path +float +folding 
-footer +fork() +fullscreen +gettext
-hangul_input +iconv +insert_expand +jumplist -keymap -langmap +libcall 
+linebreak +lispindent +listcmds +localmap -lua +menu +mksession +modify_fname 
+mouse +mouseshape -mouse_dec -mouse_gpm
-mouse_jsbterm -mouse_netterm -mouse_sysmouse +mouse_xterm -mouse_urxvt 
+multi_byte +multi_lang -mzscheme +netbeans_intg +odbeditor +path_extra -perl 
+persistent_undo +postscript +printer -profile
+python -python3 +quickfix +reltime -rightleft -ruby +scrollbind +signs 
+smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary 
+tag_old_static -tag_any_white -tcl +terminfo
+termresponse +textobjects +title +toolbar +transparency +user_commands 
+vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore 
+wildmenu +windows +writebackup -X11 -xfontset +xim
 -xsmp -xterm_clipboard -xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/opt/local/MacVim.app/Contents/Resources/vim"
Compilation: /Developer/usr/bin/llvm-gcc-4.2 -c -I. -Iproto -DHAVE_CONFIG_H 
-DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe  -I/opt/local/include 
-DMACOS_X_UNIX -no-cpp-precomp  -pipe -O2 -arch x86
_64 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: /Developer/usr/bin/llvm-gcc-4.2   -L/opt/local/lib -arch x86_64 
-L/usr/local/lib -o Vim -framework Cocoa -framework Carbon      -lm  -lncurses 
-liconv -lintl -framework Cocoa     -L/opt/local
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config 
-lpython2.7 -framework CoreFoundation -u _PyMac_Error 
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Python
}}}

Version of OS X: 10.7.2 Intel

Original issue reported on code.google.com by gunnlau...@gmail.com on 23 Jan 2012 at 3:43

GoogleCodeExporter commented 9 years ago
Thanks for the report.  It looks like this has stopped working since OS X 10.7. 
 It used to work to press Alt-d to select "Don't save".

Original comment by bjorn.winckler@gmail.com on 25 Jan 2012 at 8:38

GoogleCodeExporter commented 9 years ago
Silly me -- it is Cmd-d that is used to select "Don't save".

So to conclude: this is not a bug -- it is simply how Mac OS X works.  Any 
dialog that looks like a "Save" dialog will have its keyboard shortcuts rewired 
to the standard OS X shortcuts:

Cmd-d for "Don't save"
Esc for "Cancel"
Return for "Save"

Original comment by bjorn.winckler@gmail.com on 29 Jan 2012 at 1:15