neovim/runtime
Evgeni Chasnovski dc04ef2a20
perf(filetype): skip contents check in match() if there is no contents (#29596)
Problem: `vim.filetype.match()` tries to match on contents even if there
  is no contents (empty buffer or `{''}` explicit contents).
  This results in extra avoidable execution duration for cases.
  It matters, for example, when trying to match filetype based solely
  on file name (which still needs `contents` or `buf` to properly match
  earlier in the code path).

Solution: skip matching based solely on contents if it is `{''}`. This
  works because:
    - Matching solely on content is done after any user-configured
      `vim.filetype.add()` hooks.
    - All default matching on content might depend on supplied path
      *only* if there is non-empty content (like in
      `require('vim.filetype.detect').match_from_hashbang()`).
2024-07-08 11:20:32 -05:00
..
autoload vim-patch:3146d63: runtime(netrw): fix remaining case of register clobber 2024-07-04 23:01:35 +02:00
colors
compiler
doc vim-patch:9.1.0543: Behavior of CursorMovedC is strange (#29608) 2024-07-08 06:55:21 +08:00
ftplugin vim-patch:f77a0e9: runtime(cmakecache): include cmakecache ftplugin file 2024-07-08 12:14:44 +02:00
indent vim-patch:11d5992: runtime(rust): use shiftwidth() in indent script 2024-07-04 23:01:35 +02:00
keymap
lua perf(filetype): skip contents check in match() if there is no contents (#29596) 2024-07-08 11:20:32 -05:00
macros
pack/dist/opt
plugin
queries
spell
syntax vim-patch:8906e22: runtime(kivy): update kivy syntax, include ftplugin 2024-07-08 12:14:44 +02:00
tools
tutor
CMakeLists.txt
delmenu.vim
filetype.lua refactor: use vim._with where possible 2024-06-28 19:58:31 +02:00
ftoff.vim
ftplugin.vim
ftplugof.vim
indent.vim
indoff.vim
macmap.vim
makemenu.vim
menu.vim
mswin.vim
neovim.ico
nvim.appdata.xml
nvim.desktop
nvim.png
optwin.vim
synmenu.vim
windows_icon.rc feat(win32): embed executable icon 2024-07-02 13:05:16 +02:00