comparison src/ex_docmd.c @ 23165:a916fca16d4b v8.2.2128

patch 8.2.2128: there is no way to do something on CTRL-Z Commit: https://github.com/vim/vim/commit/100118c73ac068137cd298d22953896242752523 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Dec 11 19:30:34 2020 +0100 patch 8.2.2128: there is no way to do something on CTRL-Z Problem: There is no way to do something on CTRL-Z. Solution: Add VimSuspend and VimResume autocommand events. (closes https://github.com/vim/vim/issues/7450)
author Bram Moolenaar <Bram@vim.org>
date Fri, 11 Dec 2020 19:45:04 +0100
parents fa87b0d1277b
children bb7531f77529
comparison
equal deleted inserted replaced
23164:99ef85ff1af4 23165:a916fca16d4b
5862 */ 5862 */
5863 if (!check_restricted()) 5863 if (!check_restricted())
5864 { 5864 {
5865 if (!eap->forceit) 5865 if (!eap->forceit)
5866 autowrite_all(); 5866 autowrite_all();
5867 apply_autocmds(EVENT_VIMSUSPEND, NULL, NULL, FALSE, NULL);
5867 windgoto((int)Rows - 1, 0); 5868 windgoto((int)Rows - 1, 0);
5868 out_char('\n'); 5869 out_char('\n');
5869 out_flush(); 5870 out_flush();
5870 stoptermcap(); 5871 stoptermcap();
5871 out_flush(); // needed for SUN to restore xterm buffer 5872 out_flush(); // needed for SUN to restore xterm buffer
5879 #endif 5880 #endif
5880 starttermcap(); 5881 starttermcap();
5881 scroll_start(); // scroll screen before redrawing 5882 scroll_start(); // scroll screen before redrawing
5882 redraw_later_clear(); 5883 redraw_later_clear();
5883 shell_resized(); // may have resized window 5884 shell_resized(); // may have resized window
5885 apply_autocmds(EVENT_VIMRESUME, NULL, NULL, FALSE, NULL);
5884 } 5886 }
5885 } 5887 }
5886 5888
5887 /* 5889 /*
5888 * ":exit", ":xit" and ":wq": Write file and quite the current window. 5890 * ":exit", ":xit" and ":wq": Write file and quite the current window.