Re: matchfuzzy scoring

2020-10-15 Fir de Conversatie Maxim Kim
On 16.10.2020 9:14, Christian Brabandt wrote: On a related note, I wonder whether SEPARATOR_BONUS should also be added for path delimiters (`/` on unix `\` on windows). I think it makes sense: let g:tdata = ['hello/world','hellopworld', 'helloworld'] echo g:tdata->matchfuzzy('llwod') curre

Re: matchfuzzy scoring

2020-10-15 Fir de Conversatie Christian Brabandt
On Do, 15 Okt 2020, Yegappan Lakshmanan wrote: > Hi Bram, > > On Thu, Oct 15, 2020 at 12:24 PM Bram Moolenaar wrote: > > > Christian wrote: > > > Indeed. Initially I thought adding a bonus for a word boundary would be > > needed, therefore my naive attempt to score additionally

Re: matchfuzzy scoring

2020-10-15 Fir de Conversatie Yegappan Lakshmanan
Hi Bram, On Thu, Oct 15, 2020 at 12:24 PM Bram Moolenaar wrote: > > Christian wrote: > > > Indeed. Initially I thought adding a bonus for a word boundary would be > > needed, therefore my naive attempt to score additionally on the end of > > the match. So how about this, which adds an additional

Patch 8.2.1852

2020-10-15 Fir de Conversatie Bram Moolenaar
Patch 8.2.1852 Problem:map() returing zero for NULL list is unexpected. Solution: Return the empty list. (closes #7133) Files: src/list.c, src/testdir/test_filter_map.vim, src/testdir/test_blob.vim *** ../vim-8.2.1851/src/list.c 2020-10-10 15:37:54.190275246 +0200 --- sr

Patch 8.2.1851

2020-10-15 Fir de Conversatie Bram Moolenaar
Patch 8.2.1851 Problem:Vim9: "!" followed by space incorrectly used. Solution: Skip over trailing spaces. (closes #7131) Files: src/eval.c, src/vim9compile.c, src/testdir/test_vim9_expr.vim *** ../vim-8.2.1850/src/eval.c 2020-10-11 21:34:37.115264199 +0200 --- src/eval.c 2020-10-15

Re: matchfuzzy scoring

2020-10-15 Fir de Conversatie Bram Moolenaar
Christian wrote: > Indeed. Initially I thought adding a bonus for a word boundary would be > needed, therefore my naive attempt to score additionally on the end of > the match. So how about this, which adds an additional bonus only for a > complete match. > > iff --git a/src/search.c b/src/sear

Patch 8.2.1850

2020-10-15 Fir de Conversatie Bram Moolenaar
Patch 8.2.1850 Problem:"vat" does not select tags correctly over line break. Solution: Adjust the search pattern. (Aufar Gilbran, closes #7136) Files: src/textobject.c, src/testdir/test_textobjects.vim *** ../vim-8.2.1849/src/textobject.c2020-06-18 15:33:21.705578661 +0200 --- sr

Re: matchfuzzy scoring

2020-10-15 Fir de Conversatie Yegappan Lakshmanan
Hi Christian, On Thu, Oct 15, 2020 at 9:33 AM Christian Brabandt wrote: > > > > > Yeah, but shouldn't a complete match get an additional bonus? > > > > > > Yes. A complete sequential match should get an additional bonus. But the > > changes you posted only checks for whether the previous cha

Patch 8.2.1849

2020-10-15 Fir de Conversatie Bram Moolenaar
Patch 8.2.1849 Problem:Vim9: garbage collection frees block-local variables. Solution: Mark all script variables as used. Files: src/evalvars.c, src/testdir/test_vim9_script.vim *** ../vim-8.2.1848/src/evalvars.c 2020-10-14 19:39:16.041002546 +0200 --- src/evalvars.c 2020-1

Patch 8.2.1848

2020-10-15 Fir de Conversatie Bram Moolenaar
Patch 8.2.1848 Problem:Crash when passing a NULL string or list to popup_settext(). Solution: Check for NULL pointers. (closes #7132) Files: src/popupwin.c, src/testdir/test_popupwin.vim *** ../vim-8.2.1847/src/popupwin.c 2020-09-27 21:16:41.760046900 +0200 --- src/popupwin.c

Re: matchfuzzy scoring

2020-10-15 Fir de Conversatie Christian Brabandt
On Do, 15 Okt 2020, Yegappan Lakshmanan wrote: > Hi Christian, > > On Thu, Oct 15, 2020 at 8:55 AM Christian Brabandt wrote: > > > On Do, 15 Okt 2020, Yegappan Lakshmanan wrote: > > > Hi, > > > > On Wed, Oct 14, 2020 at 11:21 PM Maxim Kim wrote: > > > >     Hi, I wo

Re: matchfuzzy scoring

2020-10-15 Fir de Conversatie Yegappan Lakshmanan
Hi Christian, On Thu, Oct 15, 2020 at 8:55 AM Christian Brabandt wrote: > > On Do, 15 Okt 2020, Yegappan Lakshmanan wrote: > > > Hi, > > > > On Wed, Oct 14, 2020 at 11:21 PM Maxim Kim wrote: > > > > Hi, I wonder why "better" candidate has lower score than the others: > > > > https://i.i

Re: matchfuzzy scoring

2020-10-15 Fir de Conversatie Yegappan Lakshmanan
Hi Dominique, On Thu, Oct 15, 2020 at 4:25 AM Dominique Pellé wrote: > Christian Brabandt wrote: > > > On Mi, 14 Okt 2020, Maxim Kim wrote: > > > > > Hi, I wonder why "better" candidate has lower score than the others: > > > > > > https://i.imgur.com/NPhKNsZ.png > > > > > > tried to search `vim

Re: matchfuzzy scoring

2020-10-15 Fir de Conversatie Christian Brabandt
On Do, 15 Okt 2020, Yegappan Lakshmanan wrote: > Hi, > > On Wed, Oct 14, 2020 at 11:21 PM Maxim Kim wrote: > > Hi, I wonder why "better" candidate has lower score than the others: > > https://i.imgur.com/NPhKNsZ.png > > tried to search `vimrc` and `.vim/vimrc` has lower score th

Re: matchfuzzy scoring

2020-10-15 Fir de Conversatie Yegappan Lakshmanan
Hi, On Wed, Oct 14, 2020 at 11:21 PM Maxim Kim wrote: > Hi, I wonder why "better" candidate has lower score than the others: > > https://i.imgur.com/NPhKNsZ.png > > tried to search `vimrc` and `.vim/vimrc` has lower score than > `.vim/vimrc_colors`. > > > The reason is that 'vimrc' matches in mu

Patch 8.2.1847

2020-10-15 Fir de Conversatie Bram Moolenaar
Patch 8.2.1847 Problem:Vim9: using negative value for unsigned type. Solution: Use zero instead of -1. Files: src/vim9compile.c *** ../vim-8.2.1846/src/vim9compile.c 2020-10-15 12:46:38.733199522 +0200 --- src/vim9compile.c 2020-10-15 13:56:16.062457332 +0200 *** ***

Re: matchfuzzy scoring

2020-10-15 Fir de Conversatie Christian Brabandt
On Do, 15 Okt 2020, Dominique Pellé wrote: > If I understand this solution, searching for "vimrc" will > prefer "foo_vimrc" over "vimrc_foo", which does not > look ideal. correct. In your mentioned case, I would actually argue that there is no best case that everybody agrees on, either one do

Re: matchfuzzy scoring

2020-10-15 Fir de Conversatie Dominique Pellé
Christian Brabandt wrote: > On Mi, 14 Okt 2020, Maxim Kim wrote: > > > Hi, I wonder why "better" candidate has lower score than the others: > > > > https://i.imgur.com/NPhKNsZ.png > > > > tried to search `vimrc` and `.vim/vimrc` has lower score than > > `.vim/vimrc_colors`. > > The neighbor '_'

Patch 8.2.1846

2020-10-15 Fir de Conversatie Bram Moolenaar
Patch 8.2.1846 Problem:Vim9: variables declared in a local block are not found in when a function is compiled. Solution: Look for script variables in sn_all_vars. Files: src/structs.h, src/vim9compile.c, src/proto/vim9compile.pro, src/userfunc.c, src/proto/userf