diff options
-rw-r--r-- | src/testdir/test_autocmd.vim | 12 | ||||
-rw-r--r-- | src/version.c | 2 | ||||
-rw-r--r-- | src/vim.h | 4 | ||||
-rw-r--r-- | src/window.c | 1 |
4 files changed, 17 insertions, 2 deletions
diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim index c7d2534a28..6745ecbe47 100644 --- a/src/testdir/test_autocmd.vim +++ b/src/testdir/test_autocmd.vim @@ -4679,4 +4679,16 @@ func Test_SwapExists_set_other_buf_modified() bwipe! endfunc +func Test_BufEnter_botline() + set hidden + call writefile(range(10), 'Xxx1', 'D') + call writefile(range(20), 'Xxx2', 'D') + edit Xxx1 + edit Xxx2 + au BufEnter Xxx1 call assert_true(line('w$') > 1) + edit Xxx1 + au! BufEnter Xxx1 + set hidden&vim +endfunc + " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/version.c b/src/version.c index 11e18ede29..2bd0667899 100644 --- a/src/version.c +++ b/src/version.c @@ -705,6 +705,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 374, +/**/ 373, /**/ 372, @@ -656,8 +656,8 @@ extern int (*dyn_libintl_wputenv)(const wchar_t *envstring); #define VALID_VIRTCOL 0x04 // w_virtcol (file col) is valid #define VALID_CHEIGHT 0x08 // w_cline_height and w_cline_folded valid #define VALID_CROW 0x10 // w_cline_row is valid -#define VALID_BOTLINE 0x20 // w_botine and w_empty_rows are valid -#define VALID_BOTLINE_AP 0x40 // w_botine is approximated +#define VALID_BOTLINE 0x20 // w_botline and w_empty_rows are valid +#define VALID_BOTLINE_AP 0x40 // w_botline is approximated #define VALID_TOPLINE 0x80 // w_topline is valid (for cursor position) // Values for w_popup_flags. diff --git a/src/window.c b/src/window.c index 7d78b5f29a..73229059ea 100644 --- a/src/window.c +++ b/src/window.c @@ -2475,6 +2475,7 @@ win_init_empty(win_T *wp) wp->w_topfill = 0; #endif wp->w_botline = 2; + wp->w_valid = 0; #if defined(FEAT_SYN_HL) || defined(FEAT_SPELL) wp->w_s = &wp->w_buffer->b_s; #endif |