Mercurial > vim
comparison src/ex_docmd.c @ 17111:af861fccc309 v8.1.1555
patch 8.1.1555: NOT_IN_POPUP_WINDOW is confusing
commit https://github.com/vim/vim/commit/8cdbd5b3c4225b04536dea7523718695306b16b5
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jun 16 15:50:45 2019 +0200
patch 8.1.1555: NOT_IN_POPUP_WINDOW is confusing
Problem: NOT_IN_POPUP_WINDOW is confusing. (Andy Massimino)
Solution: Rename to ERROR_IF_POPUP_WINDOW().
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 16 Jun 2019 16:00:04 +0200 |
parents | 10e0d7d96cb0 |
children | 40c4cb095d53 |
comparison
equal
deleted
inserted
replaced
17110:c8fde910ac10 | 17111:af861fccc309 |
---|---|
5452 * :[N]bwipeout[!] [N] [bufname] delete buffer really | 5452 * :[N]bwipeout[!] [N] [bufname] delete buffer really |
5453 */ | 5453 */ |
5454 static void | 5454 static void |
5455 ex_bunload(exarg_T *eap) | 5455 ex_bunload(exarg_T *eap) |
5456 { | 5456 { |
5457 if (NOT_IN_POPUP_WINDOW) | 5457 if (ERROR_IF_POPUP_WINDOW) |
5458 return; | 5458 return; |
5459 eap->errmsg = do_bufdel( | 5459 eap->errmsg = do_bufdel( |
5460 eap->cmdidx == CMD_bdelete ? DOBUF_DEL | 5460 eap->cmdidx == CMD_bdelete ? DOBUF_DEL |
5461 : eap->cmdidx == CMD_bwipeout ? DOBUF_WIPE | 5461 : eap->cmdidx == CMD_bwipeout ? DOBUF_WIPE |
5462 : DOBUF_UNLOAD, eap->arg, | 5462 : DOBUF_UNLOAD, eap->arg, |
5468 * :[N]sbuffer [N] to buffer N | 5468 * :[N]sbuffer [N] to buffer N |
5469 */ | 5469 */ |
5470 static void | 5470 static void |
5471 ex_buffer(exarg_T *eap) | 5471 ex_buffer(exarg_T *eap) |
5472 { | 5472 { |
5473 if (NOT_IN_POPUP_WINDOW) | 5473 if (ERROR_IF_POPUP_WINDOW) |
5474 return; | 5474 return; |
5475 if (*eap->arg) | 5475 if (*eap->arg) |
5476 eap->errmsg = e_trailing; | 5476 eap->errmsg = e_trailing; |
5477 else | 5477 else |
5478 { | 5478 { |
6772 #endif | 6772 #endif |
6773 int use_tab = eap->cmdidx == CMD_tabedit | 6773 int use_tab = eap->cmdidx == CMD_tabedit |
6774 || eap->cmdidx == CMD_tabfind | 6774 || eap->cmdidx == CMD_tabfind |
6775 || eap->cmdidx == CMD_tabnew; | 6775 || eap->cmdidx == CMD_tabnew; |
6776 | 6776 |
6777 if (NOT_IN_POPUP_WINDOW) | 6777 if (ERROR_IF_POPUP_WINDOW) |
6778 return; | 6778 return; |
6779 | 6779 |
6780 #ifdef FEAT_GUI | 6780 #ifdef FEAT_GUI |
6781 need_mouse_correct = TRUE; | 6781 need_mouse_correct = TRUE; |
6782 #endif | 6782 #endif |
6902 static void | 6902 static void |
6903 ex_tabnext(exarg_T *eap) | 6903 ex_tabnext(exarg_T *eap) |
6904 { | 6904 { |
6905 int tab_number; | 6905 int tab_number; |
6906 | 6906 |
6907 if (NOT_IN_POPUP_WINDOW) | 6907 if (ERROR_IF_POPUP_WINDOW) |
6908 return; | 6908 return; |
6909 switch (eap->cmdidx) | 6909 switch (eap->cmdidx) |
6910 { | 6910 { |
6911 case CMD_tabfirst: | 6911 case CMD_tabfirst: |
6912 case CMD_tabrewind: | 6912 case CMD_tabrewind: |
7155 { | 7155 { |
7156 int n; | 7156 int n; |
7157 int need_hide; | 7157 int need_hide; |
7158 int exmode_was = exmode_active; | 7158 int exmode_was = exmode_active; |
7159 | 7159 |
7160 if (NOT_IN_POPUP_WINDOW) | 7160 if (ERROR_IF_POPUP_WINDOW) |
7161 return; | 7161 return; |
7162 /* | 7162 /* |
7163 * ":vi" command ends Ex mode. | 7163 * ":vi" command ends Ex mode. |
7164 */ | 7164 */ |
7165 if (exmode_active && (eap->cmdidx == CMD_visual | 7165 if (exmode_active && (eap->cmdidx == CMD_visual |