Patches for Vim - Vi IMproved 8.1

The files in this directory contain source code changes to fix problems
in a released version of Vim.  Each file also contains an explanation of
the problem that is fixed, like the message that was sent to the vim-dev
maillist.

The best is to apply the patches in sequence.  This avoids problems when
a patch depends on a previous patch. 

Before patching, change to the top Vim directory, where the "src" and
"runtime" directories are located.
Depending on the version of "patch" that you use, you may have add an
argument to make it patch the right file:
        patch -p < 8.1.0001
        patch -p0 < 8.1.0001

After applying a patch, you need to compile Vim.  There are no patches
for binaries.

Checksums for the patch files can be found in the file MD5SUMS.


Individual patches for Vim 8.1:

  SIZE  NAME      FIXES
  2006  8.1.0001  the netrw plugin does not work
  2572  8.1.0002  :stopinsert changes the message position
  3792  8.1.0003  the :compiler command is not tested
  1751  8.1.0004  test for :compiler command sometimes fails
  1807  8.1.0005  test for :compiler command fails on MS-Windows
  1693  8.1.0006  syn_id2cterm_bg() may be undefined
  1962  8.1.0007  no test for "o" and "O" in Visual block mode
  2386  8.1.0008  no test for strwidth()
  2778  8.1.0009  tabpages insufficiently tested
  9415  8.1.0010  efm_to_regpat() is too long
  2536  8.1.0011  maparg() and mapcheck() confuse empty and non-existing
  1610  8.1.0012  misplaced #endif
  6717  8.1.0013  using freed memory when changing terminal cursor color
 13559  8.1.0014  qf_init_ext() is too long
  4186  8.1.0015  cursor color wrong when closing a terminal window
  1890  8.1.0016  possible crash in term_wait()
  5801  8.1.0017  shell command completion has duplicates
  9499  8.1.0018  using "gn" may select wrong text when wrapping
  2326  8.1.0019  error when defining a Lambda with index of a function result
 15279  8.1.0020  cannot tell whether a register is executing or recording
  2235  8.1.0021  clang warns for undefined behavior
  2396  8.1.0022  repeating put from expression register fails
  2004  8.1.0023  gcc 8.1 warns for use of strncpy()
  2617  8.1.0024  % command not testded on #ifdef and comment
  4779  8.1.0025  no test for the undofile() function
  1809  8.1.0026  terminal test fails with very tall terminal
 50988  8.1.0027  difficult to make a plugin that feeds a line to a job
  1760  8.1.0028  prompt buffer test fails on MS-Windows
  1495  8.1.0029  terminal test fails on MS-Windows when "wc" exists
  3105  8.1.0030  stoping Vim running in a terminal may not work
  1611  8.1.0031  terminal test aucmd_on_close is flaky
  5262  8.1.0032  BS in prompt buffer starts new line
  1848  8.1.0033  keys to stop Vim in terminal are wrong
  2716  8.1.0034  cursor not restored with ":edit #"
  6569  8.1.0035  not easy to switch between prompt buffer and other windows
  4578  8.1.0036  not restoring Insert mode if leaving prompt buffer with mouse
 15307  8.1.0037  cannot easily append lines to another buffer
  1978  8.1.0038  popup test causes Vim to exit
  8953  8.1.0039  cannot easily delete lines in another buffer
  2531  8.1.0040  warnings from 64-bit compiler
  4059  8.1.0041  attribute "width" missing from python window attribute list
  3565  8.1.0042  if omni completion opens a window Insert mode is stopped
  3435  8.1.0043  ++bad argument of :edit does not work properly
  2509  8.1.0044  if a test function exists Vim this may go unnoticed
  8195  8.1.0045  popup test isn't run completely
  5925  8.1.0046  loading a session file fails if 'winheight' is big
  2905  8.1.0047  no completion for :unlet $VAR
  3129  8.1.0048  vim_str2nr() does not handle numbers close to the maximum
  7856  8.1.0049  shell cannot tell running in a terminal window
 12084  8.1.0050  $VIM_TERMINAL is also set when not in a terminal window
  1187  8.1.0051  MS-Windows: missing #endif
  1660  8.1.0052  when mapping to <Nop> times out the next mapping is skipped
 17493  8.1.0053  first argument of 'completefunc' has inconsistent type
  1978  8.1.0054  compiler warning for using %ld for "long long"
  2674  8.1.0055  complete test has wrong order of arguments
  2996  8.1.0056  crash when using :hardcopy with illegal byte
  5625  8.1.0057  popup menu displayed wrong when using autocmd
  5833  8.1.0058  display problem with margins and scrolling
  3006  8.1.0059  displayed digraph for "ga" wrong with 'encoding' "cp1251"
  2199  8.1.0060  crash when autocommands delete the current buffer
  9361  8.1.0061  window title is wrong after resetting and setting 'title'
 10083  8.1.0062  popup menu broken if a callback changes the window layout
  4134  8.1.0063  Mac: NSStringPboardType is deprecated
  3198  8.1.0064  typing CTRL-W in a prompt buffer shows mode "-- --"
  2714  8.1.0065  (after 8.1.0062) balloon displayed at the wrong position
  4125  8.1.0066  nasty autocommand causes using freed memory
  3453  8.1.0067  syntax highlighting not working when re-entering a buffer
  2218  8.1.0068  nasty autocommands can still cause using freed memory
 10539  8.1.0069  cannot handle pressing CTRL-C in a prompt buffer
  1772  8.1.0070  missing part of the changes for prompt_setinterrupt()
 24885  8.1.0071  terminal debugger only works with the terminal feature
  3489  8.1.0072  use of 'termwinkey' is inconsistent
  2490  8.1.0073  crash when autocommands call setloclist()
  1917  8.1.0074  (after 8.1.0073) crash when running quickfix tests
  1690  8.1.0075  no Vim logo in README file
  2192  8.1.0076  command getting cleared with CTRL-W : in a terminal window
  1575  8.1.0077  header of README file is not nice
  3972  8.1.0078  "..." used inconsistently in messages
  1941  8.1.0079  superfluous space in messages
  9680  8.1.0080  can't see the breakpoint number in the terminal debugger
  2721  8.1.0081  the terminal debugger doesn't adjust to changed 'background'
  3834  8.1.0082  in terminal window, typing : at more prompt, inserts ':'
  5227  8.1.0083  "is" and "as" have trouble with quoted punctuation
  5639  8.1.0084  user name completion does not work on MS-Windows
  3269  8.1.0085  no test for completing user name and language
  2588  8.1.0086  no tests for libcall() and libcallnr()
  6792  8.1.0087  v:shell_error is always zero when using terminal for "!cmd"
  2126  8.1.0088  terminal test for stdout and stderr is a bit flaky
  5766  8.1.0089  error when ending the terminal debugger
  4270  8.1.0090  "..." used inconsistently in a message
 10822  8.1.0091  MS-Windows: Cannot interrupt gdb when program is running
  1512  8.1.0092  (after 8.1.0091) prompt buffer test fails
  2187  8.1.0093  non-MS-Windows: Cannot interrupt gdb when program is running
  1399  8.1.0094  help text "usage:" is not capatalized
  2373  8.1.0095  dialog for ":browse tabnew" says "new window"
  4382  8.1.0096  inconsistent use of the word autocommands
  1805  8.1.0097  superfluous space before exclamation mark
  9705  8.1.0098  segfault when pattern with \z() is very slow
  1924  8.1.0099  exclamation mark in error message not needed
  1595  8.1.0100  terminal debugger: error when setting a watch point
  1769  8.1.0101  no test for getcmdwintype()
  1557  8.1.0102  cannot build without syntax highlighting
  5682  8.1.0103  long version string cannot be translated
  1709  8.1.0104  can't build without the +eval feature
 91953  8.1.0105  all tab stops are the same
  1471  8.1.0106  build fails when HAVE_DATE_TIME is undefined
  2523  8.1.0107  Python: getting buffer option clears message
206793  8.1.0108  no Danish translations
  1365  8.1.0109  new po makefile missing from distribution
  2466  8.1.0110  file name not displayed with ":file"
  4914  8.1.0111  .po files do not use recommended names
  4681  8.1.0112  no error when using bad arguments with searchpair()
  1508  8.1.0113  compiler warning for unused variable
  6304  8.1.0114  confusing variable name
  1961  8.1.0115  the matchparen plugin may throw an error
  2800  8.1.0116  display problem with 'vartabstop' and 'linebreak'
  1760  8.1.0117  URL in install program still points to SourceForge
  4245  8.1.0118  duplicate error message for put command
  1948  8.1.0119  failing test goes unnoticed because messages is not written
  5855  8.1.0120  buffer 'modified' set even when :sort has no changes
  4713  8.1.0121  crash when using ballooneval related to 'vartabstop'
  1658  8.1.0122  translators don't always understand the maintainer message
  1718  8.1.0123  MS-Windows: colors are wrong after setting 'notgc'
  1597  8.1.0124  has('vcon') returns true even for non-win32 terminal
  4884  8.1.0125  virtual edit replace with multi-byte fails at end of line
  6119  8.1.0126  various problems with 'vartabstop'
  1817  8.1.0127  build failure when disabling the session feature
 13345  8.1.0128  building with MinGW does not work out-of-the-box
  1716  8.1.0129  still some xterm-like terminals get a stray "p"
  5062  8.1.0130  ":profdel func" does not work if func was called already
  7164  8.1.0131  :profdel is not tested
 21355  8.1.0132  lua tests are old style
  3994  8.1.0133  tagfiles() can have duplicate entries
 18460  8.1.0134  Lua interface does not support funcref
  2589  8.1.0135  undo message delays screen update for CTRL-O u
  9996  8.1.0136  Lua tests don't cover new features
  8177  8.1.0137  CI does not run with TCL
  4761  8.1.0138  negative value of 'softtabstop' not used correctly
  3091  8.1.0139  Lua tests fail on some platforms
  2895  8.1.0140  recording into a register has focus events
 15890  8.1.0141  :cexpr no longer jumps to the first error
  4578  8.1.0142  xterm and vt320 builtin termcap missing keypad keys
  6351  8.1.0143  matchit and matchparen don't handle E363
  2728  8.1.0144  the :cd command does not have good test coverage
  2327  8.1.0145  test with grep is failing on MS-Windows
  1367  8.1.0146  when $LANG is set the compiler test may fail
  3044  8.1.0147  compiler warning when building with Python 3.7
  1512  8.1.0148  memory leak when using :tcl expr command
  6889  8.1.0149  session is wrong with multiple tabs when :lcd was used
 22149  8.1.0150  insufficient test coverage for Tcl
  1593  8.1.0151  mksession test fails on MS-Windows
 11431  8.1.0152  cannot easily run individual tests on MS-Windows
  1970  8.1.0153  (after 8.1.0152) build with SHADOWDIR fails
  3833  8.1.0154  crash with "set smarttab shiftwidth=0 softtabstop=-1"
  1273  8.1.0155  evim.man missing from the distribution
  1574  8.1.0156  MS-Windows compiler warning
  2144  8.1.0157  old iTerm2 is not recognized, resulting in stray output
  1647  8.1.0158  GUI: input() fails if CTRL-C was pressed before
  2569  8.1.0159  completion for user names does not work for a prefix.
  1361  8.1.0160  no Danish manual translations
  3923  8.1.0161  buffer not updated with 'autoread' set if file was deleted
  6881  8.1.0162  Danish and German man pages are not installed
  6408  8.1.0163  insufficient testing for Tcl
  2724  8.1.0164  luaeval('vim.buffer().name') returns an error
  3898  8.1.0165  :clist output can be very long
 38155  8.1.0166  using dict_add_nr_str() is clumsy
  5740  8.1.0167  lock flag in new dictitem is reset in many places
  4177  8.1.0168  output of :marks is too short with multi-byte chars
  4184  8.1.0169  calling message_filtered() a bit too often
  9933  8.1.0170  invalid memory use with complicated pattern
  3250  8.1.0171  typing CTRL-W n in a terminal window causes ml_get error
  1771  8.1.0172  'viminfofile' option does not behave like a file name
  1429  8.1.0173  compiler warning on MS-Windows
  3944  8.1.0174  after paging up and down fold line is wrong
  1934  8.1.0175  marks test fails in very wide window
  1599  8.1.0176  overlapping string argument for strcpy()
  4584  8.1.0177  defining function in sandbox is inconsistent
  1431  8.1.0178  warning for passing pointer to non-pointer argument
  1857  8.1.0179  redundant condition for boundary check
  4435  8.1.0180  static analysis errors in Lua interface
  1921  8.1.0181  memory leak with trailing characters in skip expression
  9703  8.1.0182  Unicode standard was updated
  3966  8.1.0183  Lua API changed, breaking the build
  4488  8.1.0184  not easy to figure out the window layout
  4643  8.1.0185  running tests writes lua.vim even though it is not used
  2592  8.1.0186  test for getwininfo() fails in GUI
  9073  8.1.0187  getwininfo() and win_screenpos() return different numbers
  1963  8.1.0188  no test for ":cscope add"
  1688  8.1.0189  function defined in sandbox not tested
  6411  8.1.0190  Perl refcounts are wrong
  1565  8.1.0191  Perl test fails in 24 line terminal
112175  8.1.0192  executing regexp recursively fails with a crash
  1805  8.1.0193  terminal debugger buttons don't always work
  2862  8.1.0194  possibly use of NULL pointer
  1809  8.1.0195  terminal debugger commands don't always work
  2085  8.1.0196  terminal debugger error with .gdbinit file
  2341  8.1.0197  Windows GUI: title for search/replace is wrong
  2382  8.1.0198  there is no hint that syntax is disabled for 'redrawtime'
  1487  8.1.0199  spellbadword() does not check for caps error
  3017  8.1.0200  spellbadword() not tested
 11749  8.1.0201  newer Python uses "importlib" instead of "imp"
  2036  8.1.0202  :version always shows +packages
  3913  8.1.0203  building with Perl 5.28 fails on Windows
  2093  8.1.0204  inputlist() is not tested
  6691  8.1.0205  invalid memory access with invalid modeline
  2828  8.1.0206  duplicate test function name
  2260  8.1.0207  need many menu translation files to cover regions
  1379  8.1.0208  file left behind after running individual test
  3024  8.1.0209  stderr output from Ruby messes up display
  2831  8.1.0210  still a few K&R function declarations
  7061  8.1.0211  expanding a file name "~" results in $HOME
  7545  8.1.0212  preferred cursor column not set in interfaces
  5556  8.1.0213  CTRL-W CR does not work properly in a quickfix window
  1925  8.1.0214  +autochdir feature not reported by has() or :version
  2582  8.1.0215  no error if configure --with-x cannot configure X
  2392  8.1.0216  part of file not indented properly
  2403  8.1.0217  compiler warning for variable set but not used
  6928  8.1.0218  cannot add matches to another window
  1963  8.1.0219  expanding ## fails to escape backtick
  2311  8.1.0220  Ruby converts v:true and v:false to a number
 14127  8.1.0221  not enough testing for the Ruby interface
  5102  8.1.0222  errors are reported for "make install"
  4387  8.1.0223  completing shell command finds sub-directories in $PATH
  3118  8.1.0224  hang in bracketed paste mode when t_PE not encountered
  5657  8.1.0225  mode() does not indicate using CTRL-O from Insert mode
 28724  8.1.0226  too many #ifdefs
  1700  8.1.0227  spaces instead of tabs in makefile
 15828  8.1.0228  dropping files is ignored while Vim is busy
  3254  8.1.0229  crash when dumping profiling data
  4212  8.1.0230  directly checking 'buftype' value
  3398  8.1.0231  :help -? goes to help for -+
  6091  8.1.0232  Ruby error does not include backtrace
  9163  8.1.0233  "safe" argument of call_vim_function() is always FALSE
  4813  8.1.0234  incorrect reference counting in Perl interface
  6005  8.1.0235  more help tags that jump to the wrong location
  3812  8.1.0236  Ruby build fails when ruby_intern is missing
  2407  8.1.0237  Ruby on Cygwin doesn't always work
  2455  8.1.0238  'buftype' is cleared when using ":term ++hidden cat"
  3139  8.1.0239  now Ruby build fails on other systems
  1835  8.1.0240  g:actual_curbuf set in wrong scope
  1779  8.1.0241  effect of ":tabmove N" is not clear
  2127  8.1.0242  Insert mode completion may use an invalid buffer pointer
  3046  8.1.0243  using :term ++close ++hidden closes a window
  6049  8.1.0244  no redraw when using a STOP signal on Vim and then CONT
  3316  8.1.0245  calling setline() in TextChangedI autocmd breaks undo
  1756  8.1.0246  build failure without the +eval feature
  8011  8.1.0247  Python: error message for failing import is incorrect
  4314  8.1.0248  duplicated quickfix code
  2789  8.1.0249  GTK: when screen DPI changes Vim does not handle it
  3230  8.1.0250  MS-Windows using VTP: windows size change incorrect
 12239  8.1.0251  using full path is not supported for 'backupdir'
 41015  8.1.0252  quickfix functions are too long
 14504  8.1.0253  saving and restoring window title does not always work
  2428  8.1.0254  cannot build on MS-Windows; unused macro HAVE_HANDLE_DROP
  2310  8.1.0255  backup test fails when using shadow directory
  8885  8.1.0256  using setline() in TextChangedI splits undo
  2084  8.1.0257  no test for pathshorten()
  1854  8.1.0258  not enough testing for the CompleteDone event
  4897  8.1.0259  no test for fixed quickfix issue
  1783  8.1.0260  no LGTM logo in README file
  4958  8.1.0261  Coverity complains about a negative array index
  3052  8.1.0262  not enough testing for getftype()
  3417  8.1.0263  channel log doesn't show part of channel
  3278  8.1.0264  backup tests fail when CWD is in /tmp
 23576  8.1.0265  the getcmdline() function is way too big
 10962  8.1.0266  parsing Ex address range is not a separate function
  3831  8.1.0267  no good check if restoring quickfix list worked
 10135  8.1.0268  file type checking has too many #ifdef
  3772  8.1.0269  Ruby Kernel.#p method always returns nil
  1866  8.1.0270  checking for a Tab in a line could be faster
 13097  8.1.0271  'incsearch' doesn't work for :s, :g or :v
  1723  8.1.0272  options test fails if temp var ends in slash
  1470  8.1.0273  invalid memory access when using 'incsearch'
  4628  8.1.0274  'incsearch' triggers on ":source"
  4964  8.1.0275  'incsearch' with :s doesn't start at cursor line
  2991  8.1.0276  no test for 'incsearch' highlighting with :s
  9021  8.1.0277  'incsearch' highlighting wrong in a few cases
  2988  8.1.0278  'incsearch' highlighting does not accept reverse range
  3306  8.1.0279  'incsearch' highlighting does not skip white space
  2293  8.1.0280  'incsearch' highlighting does not work for ":g!/"
 19659  8.1.0281  parsing command modifiers is not separated
 14174  8.1.0282  'incsearch' does not work with command modifiers
  1846  8.1.0283  missing test dump
  3774  8.1.0284  'cursorline' highlighting wrong with 'incsearch'
  1416  8.1.0285  compiler warning for conversion
  3285  8.1.0286  'incsearch' does not apply to :smagic and :snomagic
  1772  8.1.0287  MAX is not defined everywhere
 12170  8.1.0288  quickfix code uses cmdidx too often
  2018  8.1.0289  cursor moves to wrong column after quickfix jump
  2722  8.1.0290  "cit" on an empty HTML tag changes the whole tag
  4355  8.1.0291  'incsearch' highlighting not used for :sort
  2120  8.1.0292  MS-Windows: the text "self-installing" confuses some users
  5483  8.1.0293  checks for type of stack is cryptic
  2332  8.1.0294  MS-Windows: sometimes uses short directory name
  9332  8.1.0295  no 'incsearch' highlighting for :vimgrep and similar
  8125  8.1.0296  command parsing for 'incsearch' is a bit ugly
  2733  8.1.0297  MS-Windows: tests fail, Vim crashes
  1475  8.1.0298  window resize test sometimes fails on Mac
  1657  8.1.0299  misplaced comment
  2295  8.1.0300  the old window title might be freed twice
  8790  8.1.0301  GTK: input method popup displayed on wrong screen.
  6061  8.1.0302  crash when using :suspend and "fg"
  2912  8.1.0303  line2byte() is wrong for last line with 'noeol'
  9124  8.1.0304  no redraw when using a STOP signal on Vim and then CONT
  3073  8.1.0305  missing support for Lua 5.4 32 bits on Unix
 14029  8.1.0306  plural messages are not translated properly
  6949  8.1.0307  there is no good way to get the window layout
  1720  8.1.0308  a quick undo shows "1 seconds ago"
 18244  8.1.0309  profiling does not show a count for condition lines
  3277  8.1.0310  file info msg not always suppressed with 'F' in 'shortmess'
  4009  8.1.0311  filtering entries in a quickfix list is not easy
  7961  8.1.0312  wrong type for flags used in signal handlers
  7881  8.1.0313  information about a swap file is unavailable
  5176  8.1.0314  build failure without the +eval feature
  6290  8.1.0315  helpgrep with language doesn't work properly
  2195  8.1.0316  swapinfo() test fails on Travis
  2110  8.1.0317  Cscope test fails when using shadow directory
  3126  8.1.0318  the getftype() test may fail for char devices
  1642  8.1.0319  bzero() function prototype doesn't work for Android
  4447  8.1.0320  too much 'incsearch' highlight for pat matching everything
