Mercurial > vim
comparison src/ex_cmds.c @ 684:a8caf7dd853d v7.0205
updated for version 7.0205
author | vimboss |
---|---|
date | Thu, 23 Feb 2006 21:34:44 +0000 |
parents | 9364d114ed8d |
children | 07d199fe02ed |
comparison
equal
deleted
inserted
replaced
683:a39b8af64334 | 684:a8caf7dd853d |
---|---|
5298 need_mouse_correct = TRUE; | 5298 need_mouse_correct = TRUE; |
5299 #endif | 5299 #endif |
5300 | 5300 |
5301 /* | 5301 /* |
5302 * Re-use an existing help window or open a new one. | 5302 * Re-use an existing help window or open a new one. |
5303 * Always open a new one for ":tab help". | |
5303 */ | 5304 */ |
5304 if (!curwin->w_buffer->b_help) | 5305 if (!curwin->w_buffer->b_help |
5305 { | |
5306 #ifdef FEAT_WINDOWS | 5306 #ifdef FEAT_WINDOWS |
5307 for (wp = firstwin; wp != NULL; wp = wp->w_next) | 5307 || cmdmod.tab != 0 |
5308 if (wp->w_buffer != NULL && wp->w_buffer->b_help) | 5308 #endif |
5309 break; | 5309 ) |
5310 { | |
5311 #ifdef FEAT_WINDOWS | |
5312 if (cmdmod.tab != 0) | |
5313 wp = NULL; | |
5314 else | |
5315 for (wp = firstwin; wp != NULL; wp = wp->w_next) | |
5316 if (wp->w_buffer != NULL && wp->w_buffer->b_help) | |
5317 break; | |
5310 if (wp != NULL && wp->w_buffer->b_nwindows > 0) | 5318 if (wp != NULL && wp->w_buffer->b_nwindows > 0) |
5311 win_enter(wp, TRUE); | 5319 win_enter(wp, TRUE); |
5312 else | 5320 else |
5313 #endif | 5321 #endif |
5314 { | 5322 { |
5323 } | 5331 } |
5324 fclose(helpfd); | 5332 fclose(helpfd); |
5325 | 5333 |
5326 #ifdef FEAT_WINDOWS | 5334 #ifdef FEAT_WINDOWS |
5327 /* Split off help window; put it at far top if no position | 5335 /* Split off help window; put it at far top if no position |
5328 * specified, the current window is vertically split and narrow. */ | 5336 * specified, the current window is vertically split and |
5337 * narrow. */ | |
5329 n = WSP_HELP; | 5338 n = WSP_HELP; |
5330 # ifdef FEAT_VERTSPLIT | 5339 # ifdef FEAT_VERTSPLIT |
5331 if (cmdmod.split == 0 && curwin->w_width != Columns | 5340 if (cmdmod.split == 0 && curwin->w_width != Columns |
5332 && curwin->w_width < 80) | 5341 && curwin->w_width < 80) |
5333 n |= WSP_TOP; | 5342 n |= WSP_TOP; |
5334 # endif | 5343 # endif |
5335 if (win_split(0, n) == FAIL) | 5344 if (win_split(0, n) == FAIL) |
5345 goto erret; | |
5336 #else | 5346 #else |
5337 /* use current window */ | 5347 /* use current window */ |
5338 if (!can_abandon(curbuf, FALSE)) | 5348 if (!can_abandon(curbuf, FALSE)) |
5339 #endif | |
5340 goto erret; | 5349 goto erret; |
5350 #endif | |
5341 | 5351 |
5342 #ifdef FEAT_WINDOWS | 5352 #ifdef FEAT_WINDOWS |
5343 if (curwin->w_height < p_hh) | 5353 if (curwin->w_height < p_hh) |
5344 win_setheight((int)p_hh); | 5354 win_setheight((int)p_hh); |
5345 #endif | 5355 #endif |