Problem Statement.
  Unasked-for vertical split created in second tabbed window


Test Environment.
  gVim, patch 413 (https://www.vim.org/download.php#pc)
  Windows 10, 64-bit
  Windows XP, 32-bit


Problem Demonstration.
  There are two requirements to demonstrate the problem:
    1.  an autocmd for BufEnter that changes the value of option
        'columns' and
    2.  use of the -p command line option to create tabbed windows.
  I have attached files that can be used to demonstrate the problem.

  The "_vimrc" file contains two autocmds:
    autocmd! BufEnter
    autocmd  BufEnter *.txt   set columns=84
  There is nothing special about the extension .txt- any one will do.
  The value "84" for 'columns' was chosen because it is larger than the
  documented Windows default of 80.  A value less than 80 will not
  demonstrate the problem.

  Two .txt files have been provided for convenience and ease of
  demonstration.  It matters not what's in them.

  Launch gVim in a cmd.exe window:
    gvim --clean --noplugins -u _vimrc -p tab1.txt tab2.txt

  The gvim window will initially show tab1.txt (its tab is selected) and
  its width will be 84 characters.  No vertical split is seen.
  Next, select the second tab, either by mouse or ":tabnext 2".
  A vertical split will be seen in column 81.  You can verify it is
  a vertical split by defining the highlight group "VertSplit".


Additional Observations.
  1.  When the vertical split is visible, redrawing the screen will not
      cause it to vanish.  Neither will creating a "help" window or any
      other horizontal split.  However, if the horizontally split window
      is then closed, the vertical split will vanish.
  2.  The vertical split will vanish if the number of columns is changed,
      either by mouse dragging or changing the value of 'columns'.
      Once the split is gone, it will not reappear if you change tabs.
  3.  If a third file is added to the command line, a vertical split is
      observed in the third tab as well as the second.  Resizing the
      window in any tab causes the split to disappear in both windows.
  4.  If the BufEnter event is replaced with TabEnter, the behavior is
      unchanged- the vertical split is created.
  5.  If explicit filenames are used in the autocmd and each one specifies
      a different value for 'columns', no vertical splits are seen in
      either tab.  This is why there are two commented-out autocmd lines
      in the _vimrc file I've provided.
  6.  I've observed this same behavior with gVim, patch 216 with "normal"
      features.

Sorry for the verbosity but I thought it would be helpful.


--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
autocmd! BufEnter 
autocmd  BufEnter *.txt   set columns=84
"autocmd  BufEnter a.txt   set columns=84
"autocmd  BufEnter b.txt   set columns=88
File tab1.txt
File tab2.txt
Line 2
Line 3

Raspunde prin e-mail lui