martanne / vis

A vi-like editor based on Plan 9's structural regular expressions
Other
4.19k stars 260 forks source link

lua: complete-filename: use biggest possible prefix #1187

Closed fischerling closed 1 month ago

fischerling commented 2 months ago

This allows for example to complete file names in markdown images.

E.g.: ![](pic<C-x><C-f> will complete the file name starting with pic.

Previously it would have detected the '[' as prefix and looked for files starting with ](pic.

Maybe I can sneek this in before #1185. This is sitting on top of my tree for quite some time now and I have not encountered any regression using the biggest possible match with our regex.

Apparently, my email setup is currently broken hence the github pull request.

rnpnr commented 1 month ago

Looked fine to me, thanks!