Mercurial > vim
comparison src/ex_cmds.c @ 17431:ce35cdbe9f74 v8.1.1714
patch 8.1.1714: cannot preview a file in a popup window
commit https://github.com/vim/vim/commit/7964873afe59d0896a921b7c585167674bb784d5
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jul 18 21:43:07 2019 +0200
patch 8.1.1714: cannot preview a file in a popup window
Problem: Cannot preview a file in a popup window.
Solution: Add the 'previewpopup' option.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 18 Jul 2019 21:45:06 +0200 |
parents | 94cc7da54754 |
children | cfdef48743ed |
comparison
equal
deleted
inserted
replaced
17430:23c5d343007c | 17431:ce35cdbe9f74 |
---|---|
6268 /* | 6268 /* |
6269 * If there is already a preview window open, use that one. | 6269 * If there is already a preview window open, use that one. |
6270 */ | 6270 */ |
6271 if (!curwin->w_p_pvw) | 6271 if (!curwin->w_p_pvw) |
6272 { | 6272 { |
6273 FOR_ALL_WINDOWS(wp) | 6273 # ifdef FEAT_TEXT_PROP |
6274 if (wp->w_p_pvw) | 6274 if (*p_pvp != NUL) |
6275 break; | 6275 { |
6276 wp = popup_find_preview_window(); | |
6277 if (wp != NULL) | |
6278 popup_set_wantpos(wp); | |
6279 } | |
6280 else | |
6281 # endif | |
6282 { | |
6283 FOR_ALL_WINDOWS(wp) | |
6284 if (wp->w_p_pvw) | |
6285 break; | |
6286 } | |
6276 if (wp != NULL) | 6287 if (wp != NULL) |
6277 win_enter(wp, undo_sync); | 6288 win_enter(wp, undo_sync); |
6278 else | 6289 else |
6279 { | 6290 { |
6280 /* | 6291 /* |
6281 * There is no preview window open yet. Create one. | 6292 * There is no preview window open yet. Create one. |
6282 */ | 6293 */ |
6283 if (win_split(g_do_tagpreview > 0 ? g_do_tagpreview : 0, 0) | 6294 # ifdef FEAT_TEXT_PROP |
6284 == FAIL) | 6295 if (*p_pvp != NUL) |
6296 return popup_create_preview_window(); | |
6297 # endif | |
6298 if (win_split(g_do_tagpreview > 0 ? g_do_tagpreview : 0, 0) == FAIL) | |
6285 return FALSE; | 6299 return FALSE; |
6286 curwin->w_p_pvw = TRUE; | 6300 curwin->w_p_pvw = TRUE; |
6287 curwin->w_p_wfh = TRUE; | 6301 curwin->w_p_wfh = TRUE; |
6288 RESET_BINDING(curwin); /* don't take over 'scrollbind' | 6302 RESET_BINDING(curwin); // don't take over 'scrollbind' |
6289 and 'cursorbind' */ | 6303 // and 'cursorbind' |
6290 # ifdef FEAT_DIFF | 6304 # ifdef FEAT_DIFF |
6291 curwin->w_p_diff = FALSE; /* no 'diff' */ | 6305 curwin->w_p_diff = FALSE; // no 'diff' |
6292 # endif | 6306 # endif |
6293 # ifdef FEAT_FOLDING | 6307 # ifdef FEAT_FOLDING |
6294 curwin->w_p_fdc = 0; /* no 'foldcolumn' */ | 6308 curwin->w_p_fdc = 0; // no 'foldcolumn' |
6295 # endif | 6309 # endif |
6296 return TRUE; | 6310 return TRUE; |
6297 } | 6311 } |
6298 } | 6312 } |
6299 return FALSE; | 6313 return FALSE; |