diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2024-03-25 18:46:50 +0100 |
|---|---|---|
| committer | Randy Palamar <randy@rnpnr.xyz> | 2024-04-30 19:54:55 -0600 |
| commit | 4d5bfb807bee2d914587b50d1fe17c994bcbffab (patch) | |
| tree | 2becaeaf2f9ddc7b3ee90baf1dc602efa4cfefdf /lua/plugins | |
| parent | 675ab49ed928e4ae63363f77007ec6c99e91a51a (diff) | |
| download | vis-4d5bfb807bee2d914587b50d1fe17c994bcbffab.tar.gz vis-4d5bfb807bee2d914587b50d1fe17c994bcbffab.tar.xz | |
lua: complete-filename: use biggest possible prefix
This allows for example to complete file names in markdown images.
E.g.: 
| -rw-r--r-- | lua/plugins/complete-filename.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/plugins/complete-filename.lua b/lua/plugins/complete-filename.lua index 70431b6..43cf14b 100644 --- a/lua/plugins/complete-filename.lua +++ b/lua/plugins/complete-filename.lua @@ -13,7 +13,7 @@ local complete_filename = function(expand) if not prefix then return end -- Strip leading delimiters for some programming languages - local _, j = prefix:find("[{[(<'\"]+") + local _, j = prefix:find(".*[{[(<'\"]+") if not expand and j then prefix = prefix:sub(j + 1) end if prefix:match("^%s*$") then |
