comparison src/buffer.c @ 34470:dd8f5311cee5 v9.1.0147

patch 9.1.0147: Cannot keep a buffer focused in a window Commit: https://github.com/vim/vim/commit/215703563757a4464907ead6fb9edaeb7f430bea Author: Colin Kennedy <colinvfx@gmail.com> Date: Sun Mar 3 16:16:47 2024 +0100 patch 9.1.0147: Cannot keep a buffer focused in a window Problem: Cannot keep a buffer focused in a window (Amit Levy) Solution: Add the 'winfixbuf' window-local option (Colin Kennedy) fixes: #6445 closes: #13903 Signed-off-by: Colin Kennedy <colinvfx@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Sun, 03 Mar 2024 16:30:06 +0100
parents f8fed6c8bb60
children 9e093c96dff6
comparison
equal deleted inserted replaced
34469:055c08ca0446 34470:dd8f5311cee5
1368 } 1368 }
1369 #ifdef FEAT_PROP_POPUP 1369 #ifdef FEAT_PROP_POPUP
1370 if ((flags & DOBUF_NOPOPUP) && bt_popup(buf) && !bt_terminal(buf)) 1370 if ((flags & DOBUF_NOPOPUP) && bt_popup(buf) && !bt_terminal(buf))
1371 return OK; 1371 return OK;
1372 #endif 1372 #endif
1373 if (
1374 action == DOBUF_GOTO
1375 && buf != curbuf
1376 && !check_can_set_curbuf_forceit((flags & DOBUF_FORCEIT) ? TRUE : FALSE))
1377 // disallow navigating to another buffer when 'winfixbuf' is applied
1378 return FAIL;
1379
1373 if ((action == DOBUF_GOTO || action == DOBUF_SPLIT) 1380 if ((action == DOBUF_GOTO || action == DOBUF_SPLIT)
1374 && (buf->b_flags & BF_DUMMY)) 1381 && (buf->b_flags & BF_DUMMY))
1375 { 1382 {
1376 // disallow navigating to the dummy buffer 1383 // disallow navigating to the dummy buffer
1377 semsg(_(e_buffer_nr_does_not_exist), count); 1384 semsg(_(e_buffer_nr_does_not_exist), count);