comparison src/buffer.c @ 825:6675076019ae v7.0d

updated for version 7.0d
author vimboss
date Mon, 10 Apr 2006 14:55:34 +0000
parents 57c7403f6599
children 8bebcabccc2c
comparison
equal deleted inserted replaced
824:8dd456c1e283 825:6675076019ae
1210 */ 1210 */
1211 if (action == DOBUF_SPLIT) /* split window first */ 1211 if (action == DOBUF_SPLIT) /* split window first */
1212 { 1212 {
1213 # ifdef FEAT_WINDOWS 1213 # ifdef FEAT_WINDOWS
1214 /* jump to first window containing buf if one exists ("useopen") */ 1214 /* jump to first window containing buf if one exists ("useopen") */
1215 if (vim_strchr(p_swb, 'u') && buf_jump_open_win(buf)) 1215 if (vim_strchr(p_swb, 'o') && buf_jump_open_win(buf))
1216 return OK;
1217 /* jump to first window in any tab page containing buf if one exists
1218 * ("usetab") */
1219 if (vim_strchr(p_swb, 'a') && buf_jump_open_tab(buf))
1216 return OK; 1220 return OK;
1217 if (win_split(0, 0) == FAIL) 1221 if (win_split(0, 0) == FAIL)
1218 # endif 1222 # endif
1219 return FAIL; 1223 return FAIL;
1220 } 1224 }
1314 #else 1318 #else
1315 if (buf_valid(prevbuf)) 1319 if (buf_valid(prevbuf))
1316 #endif 1320 #endif
1317 { 1321 {
1318 if (prevbuf == curbuf) 1322 if (prevbuf == curbuf)
1319 u_sync(); 1323 u_sync(FALSE);
1320 close_buffer(prevbuf == curwin->w_buffer ? curwin : NULL, prevbuf, 1324 close_buffer(prevbuf == curwin->w_buffer ? curwin : NULL, prevbuf,
1321 unload ? action : (action == DOBUF_GOTO 1325 unload ? action : (action == DOBUF_GOTO
1322 && !P_HID(prevbuf) 1326 && !P_HID(prevbuf)
1323 && !bufIsChanged(prevbuf)) ? DOBUF_UNLOAD : 0); 1327 && !bufIsChanged(prevbuf)) ? DOBUF_UNLOAD : 0);
1324 } 1328 }
1831 1835
1832 #ifdef FEAT_WINDOWS 1836 #ifdef FEAT_WINDOWS
1833 if (options & GETF_SWITCH) 1837 if (options & GETF_SWITCH)
1834 { 1838 {
1835 /* use existing open window for buffer if wanted */ 1839 /* use existing open window for buffer if wanted */
1836 if (vim_strchr(p_swb, 'u')) /* useopen */ 1840 if (vim_strchr(p_swb, 'o')) /* useopen */
1837 wp = buf_jump_open_win(buf); 1841 wp = buf_jump_open_win(buf);
1842 /* use existing open window in any tab page for buffer if wanted */
1843 if (vim_strchr(p_swb, 'a')) /* usetab */
1844 wp = buf_jump_open_tab(buf);
1838 /* split window if wanted ("split") */ 1845 /* split window if wanted ("split") */
1839 if (wp == NULL && vim_strchr(p_swb, 't') && !bufempty()) 1846 if (wp == NULL && vim_strchr(p_swb, 't') && !bufempty())
1840 { 1847 {
1841 if (win_split(0, 0) == FAIL) 1848 if (win_split(0, 0) == FAIL)
1842 return FAIL; 1849 return FAIL;