I think iTerm only supports internally the confirmation for Cmd-Q, and 'close multiple sessions', neither of
which would trigger for a single tab Cmd-W.
I'm using Butler (
http://manytricks.com/butler/) which can support global hotkeys to trap Cmd-W (active only when
iTerm is frontmost app), and ignore it. You could probably do the same, or use the OSX System Preferences keyboard
shortcuts config to rebind it to something less easy to fatfinger.
System Prefs -> Keyboard -> Keyboard Shortcuts -> select 'Application Shortcuts' -> '+', select iTerm from list,
set command to be 'Close', and set a shortcut of something unlikely like Cmd-Ctrl-Shift-W or so.
HTH. Cheers,
Tom