Mercurial > vim
comparison src/ex_docmd.c @ 13392:d5347779fb20 v8.0.1570
patch 8.0.1570: can't use :popup for a menu in the terminal
commit https://github.com/vim/vim/commit/29a2c08d792e4458a0af8371f5341394829fce29
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Mar 5 21:06:23 2018 +0100
patch 8.0.1570: can't use :popup for a menu in the terminal
Problem: Can't use :popup for a menu in the terminal. (Wei Zhang)
Solution: Make :popup work in the terminal. Also fix that entries were
included that don't work in the current state.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 05 Mar 2018 21:15:05 +0100 |
parents | 6740c499de13 |
children | fa198b71bab2 |
comparison
equal
deleted
inserted
replaced
13391:6ef2dba73dab | 13392:d5347779fb20 |
---|---|
202 #if defined(FEAT_GUI_W32) && defined(FEAT_MENU) && defined(FEAT_TEAROFF) | 202 #if defined(FEAT_GUI_W32) && defined(FEAT_MENU) && defined(FEAT_TEAROFF) |
203 static void ex_tearoff(exarg_T *eap); | 203 static void ex_tearoff(exarg_T *eap); |
204 #else | 204 #else |
205 # define ex_tearoff ex_ni | 205 # define ex_tearoff ex_ni |
206 #endif | 206 #endif |
207 #if (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_GTK)) && defined(FEAT_MENU) | 207 #if (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_GTK) \ |
208 || defined(FEAT_TERM_POPUP_MENU)) && defined(FEAT_MENU) | |
208 static void ex_popup(exarg_T *eap); | 209 static void ex_popup(exarg_T *eap); |
209 #else | 210 #else |
210 # define ex_popup ex_ni | 211 # define ex_popup ex_ni |
211 #endif | 212 #endif |
212 #ifndef FEAT_GUI_MSWIN | 213 #ifndef FEAT_GUI_MSWIN |
8739 { | 8740 { |
8740 gui_make_tearoff(eap->arg); | 8741 gui_make_tearoff(eap->arg); |
8741 } | 8742 } |
8742 #endif | 8743 #endif |
8743 | 8744 |
8744 #if (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_GTK)) && defined(FEAT_MENU) | 8745 #if (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_GTK) \ |
8746 || defined(FEAT_TERM_POPUP_MENU)) && defined(FEAT_MENU) | |
8745 static void | 8747 static void |
8746 ex_popup(exarg_T *eap) | 8748 ex_popup(exarg_T *eap) |
8747 { | 8749 { |
8748 gui_make_popup(eap->arg, eap->forceit); | 8750 # if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_GTK) |
8751 if (gui.in_use) | |
8752 gui_make_popup(eap->arg, eap->forceit); | |
8753 # ifdef FEAT_TERM_POPUP_MENU | |
8754 else | |
8755 # endif | |
8756 # endif | |
8757 # ifdef FEAT_TERM_POPUP_MENU | |
8758 pum_make_popup(eap->arg, eap->forceit); | |
8759 # endif | |
8749 } | 8760 } |
8750 #endif | 8761 #endif |
8751 | 8762 |
8752 static void | 8763 static void |
8753 ex_swapname(exarg_T *eap UNUSED) | 8764 ex_swapname(exarg_T *eap UNUSED) |