From 0e0d4a7b4c0a38c83282013b732c83d82b1844e9 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 15 Oct 2019 20:35:47 -0400 Subject: vim-patch:8.1.2152: problems navigating tags file on MacOS Catalina Problem: Problems navigating tags file on MacOS Catalina. Solution: Use fseek instead of lseek. (John Lamb, fixes vim/vim#5061) https://github.com/vim/vim/commit/27fc8cab227e30f649f52e74efd58ad56d21e9bb --- src/nvim/tag.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/nvim/tag.c b/src/nvim/tag.c index 1f70a10f28..c8c9677a98 100644 --- a/src/nvim/tag.c +++ b/src/nvim/tag.c @@ -1094,7 +1094,6 @@ find_tags ( int low_char; // first char at low_offset int high_char; // first char at high_offset } search_info; - off_T filesize; int tagcmp; off_T offset; int round; @@ -1503,19 +1502,21 @@ line_read_in: state = TS_LINEAR; } - /* - * When starting a binary search, get the size of the file and - * compute the first offset. - */ + // When starting a binary search, get the size of the file and + // compute the first offset. if (state == TS_BINARY) { if (vim_fseek(fp, 0, SEEK_END) != 0) { + // can't seek, don't use binary search state = TS_LINEAR; } else { - filesize = vim_ftell(fp); + // Get the tag file size. + // Don't use lseek(), it doesn't work + // properly on MacOS Catalina. + const off_T filesize = vim_ftell(fp); vim_fseek(fp, 0, SEEK_SET); - /* Calculate the first read offset in the file. Start - * the search in the middle of the file. */ + // Calculate the first read offset in the file. Start + // the search in the middle of the file. search_info.low_offset = 0; search_info.low_char = 0; search_info.high_offset = filesize; -- cgit From c54a7e586bc39ff5798b32641aefd320389a0303 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 16 Oct 2019 19:16:04 -0400 Subject: vim-patch:8.1.2161: mapping test fails Problem: Mapping test fails. Solution: Run the test separately. https://github.com/vim/vim/commit/4bd88d568a81d37df69dc3cf8cdd8d9dbb4011b7 --- src/nvim/testdir/test_alot.vim | 1 - 1 file changed, 1 deletion(-) diff --git a/src/nvim/testdir/test_alot.vim b/src/nvim/testdir/test_alot.vim index 6bf2e8329c..2c52452f6b 100644 --- a/src/nvim/testdir/test_alot.vim +++ b/src/nvim/testdir/test_alot.vim @@ -27,7 +27,6 @@ source test_jumps.vim source test_fileformat.vim source test_filetype.vim source test_lambda.vim -source test_mapping.vim source test_menu.vim source test_messages.vim source test_modeline.vim -- cgit From 7ba26ef3c01305334ccd84a78ef04d6f54e6b486 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 16 Oct 2019 19:11:03 -0400 Subject: vim-patch:8.1.2162: popup resize test is flaky Problem: Popup resize test is flaky. (Christian Brabandt) Solution: Add the function to the list of flaky tests. https://github.com/vim/vim/commit/4e03933726e3698d962bf7dacdd27f306a4c5086 --- src/nvim/testdir/runtest.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/src/nvim/testdir/runtest.vim b/src/nvim/testdir/runtest.vim index 8f5f3f82e7..49ec308db6 100644 --- a/src/nvim/testdir/runtest.vim +++ b/src/nvim/testdir/runtest.vim @@ -289,6 +289,7 @@ let s:flaky_tests = [ \ 'Test_oneshot()', \ 'Test_out_cb()', \ 'Test_paused()', + \ 'Test_popup_and_window_resize()', \ 'Test_quoteplus()', \ 'Test_quotestar()', \ 'Test_reltime()', -- cgit From 6c6abd11f75052d8bbc1a3ff279aab61ed0bca58 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Mon, 14 Oct 2019 17:55:07 -0400 Subject: vim-patch:8.1.2151: state test is a bit flaky Problem: State test is a bit flaky. Solution: Add to the list of flaky tests. https://github.com/vim/vim/commit/3c8cd4a1dcbc34d8818a2a38b1d1e4755da9edc2 --- src/nvim/testdir/runtest.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/src/nvim/testdir/runtest.vim b/src/nvim/testdir/runtest.vim index 49ec308db6..5c2e570adf 100644 --- a/src/nvim/testdir/runtest.vim +++ b/src/nvim/testdir/runtest.vim @@ -295,6 +295,7 @@ let s:flaky_tests = [ \ 'Test_reltime()', \ 'Test_repeat_many()', \ 'Test_repeat_three()', + \ 'Test_state()', \ 'Test_stop_all_in_callback()', \ 'Test_terminal_composing_unicode()', \ 'Test_terminal_redir_file()', -- cgit From 1e4a9f9993a26a1495d1a3bdfd80fe079127ba83 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Fri, 18 Oct 2019 23:20:15 -0400 Subject: vim-patch:8.1.2175: meson files are not recognized Problem: Meson files are not recognized. Solution: Add the meson filetype. (Liam Beguin , Nirbheek Chauhan, closes vim/vim#5056) Also recognize hollywood. https://github.com/vim/vim/commit/c3bf7b56f2703e2d6f36dfb05fd32b5b43ce3c3f --- runtime/filetype.vim | 3 +++ src/nvim/testdir/test_filetype.vim | 2 ++ 2 files changed, 5 insertions(+) diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 6abf9da55f..bbf9a91e2d 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -975,6 +975,9 @@ au BufNewFile,BufRead hg-editor-*.txt setf hgcommit " Mercurial config (looks like generic config file) au BufNewFile,BufRead *.hgrc,*hgrc setf cfg +" Meson Build system config +au BufNewFile,BufRead meson.build,meson_options.txt setf meson + " Messages (logs mostly) au BufNewFile,BufRead */log/{auth,cron,daemon,debug,kern,lpr,mail,messages,news/news,syslog,user}{,.log,.err,.info,.warn,.crit,.notice}{,.[0-9]*,-[0-9]*} setf messages diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index 7512d599b8..8e76046b13 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -201,6 +201,7 @@ let s:filename_checks = { \ 'hex': ['file.hex', 'file.h32'], \ 'hgcommit': ['hg-editor-file.txt'], \ 'hog': ['file.hog', 'snort.conf', 'vision.conf'], + \ 'hollywood': ['file.hws'], \ 'hostconf': ['/etc/host.conf'], \ 'hostsaccess': ['/etc/hosts.allow', '/etc/hosts.deny'], \ 'template': ['file.tmpl'], @@ -273,6 +274,7 @@ let s:filename_checks = { \ 'mason': ['file.mason', 'file.mhtml', 'file.comp'], \ 'master': ['file.mas', 'file.master'], \ 'mel': ['file.mel'], + \ 'meson': ['meson.build', 'meson_options.txt'], \ 'messages': ['/log/auth', '/log/cron', '/log/daemon', '/log/debug', '/log/kern', '/log/lpr', '/log/mail', '/log/messages', '/log/news/news', '/log/syslog', '/log/user', \ '/log/auth.log', '/log/cron.log', '/log/daemon.log', '/log/debug.log', '/log/kern.log', '/log/lpr.log', '/log/mail.log', '/log/messages.log', '/log/news/news.log', '/log/syslog.log', '/log/user.log', \ '/log/auth.err', '/log/cron.err', '/log/daemon.err', '/log/debug.err', '/log/kern.err', '/log/lpr.err', '/log/mail.err', '/log/messages.err', '/log/news/news.err', '/log/syslog.err', '/log/user.err', -- cgit From 437fe261ab93e5b366fdcd095ccac7be1235b0eb Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 19 Oct 2019 11:55:23 -0400 Subject: vim-patch:8.1.2177: Dart files are not recognized Problem: Dart files are not recognized. Solution: Add a filetype rule. (Eugene Ciurana, closes vim/vim#5087) https://github.com/vim/vim/commit/afbdb905c37675851e79d21239f502cd8e4ced9e --- runtime/filetype.vim | 3 +++ src/nvim/testdir/test_filetype.vim | 1 + 2 files changed, 4 insertions(+) diff --git a/runtime/filetype.vim b/runtime/filetype.vim index bbf9a91e2d..8ce45b6a50 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -421,6 +421,9 @@ au BufNewFile,BufRead *.csp,*.fdr setf csp au BufNewFile,BufRead *.pld setf cupl au BufNewFile,BufRead *.si setf cuplsim +" Dart +au BufRead,BufNewfile *.dart,*.drt setf dart + " Debian Control au BufNewFile,BufRead */debian/control setf debcontrol au BufNewFile,BufRead control diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index 8e76046b13..4053746c82 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -122,6 +122,7 @@ let s:filename_checks = { \ 'cvs': ['cvs123'], \ 'cvsrc': ['.cvsrc'], \ 'cynpp': ['file.cyn'], + \ 'dart': ['file.dart', 'file.drt'], \ 'datascript': ['file.ds'], \ 'dcd': ['file.dcd'], \ 'debcontrol': ['/debian/control'], -- cgit From d27fc0825732d575109ce7d149164e86d7b2cb98 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 19 Oct 2019 11:57:34 -0400 Subject: vim-patch:8.1.2178: accessing uninitialized memory in test Problem: Accessing uninitialized memory in test. Solution: Check if there was a match before using the match position. (Dominique Pelle, closes vim/vim#5088) https://github.com/vim/vim/commit/15ee567809a9808693163dd7c357ef0c172ecc9e --- src/nvim/search.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/nvim/search.c b/src/nvim/search.c index 1f382d31c5..fb31e76986 100644 --- a/src/nvim/search.c +++ b/src/nvim/search.c @@ -4184,7 +4184,7 @@ static int is_one_char(char_u *pattern, bool move, pos_T *cur, nmatched = vim_regexec_multi(®match, curwin, curbuf, pos.lnum, regmatch.startpos[0].col, NULL, NULL); - if (!nmatched) { + if (nmatched != 0) { break; } } while (direction == FORWARD @@ -4196,7 +4196,10 @@ static int is_one_char(char_u *pattern, bool move, pos_T *cur, && regmatch.startpos[0].lnum == regmatch.endpos[0].lnum && regmatch.startpos[0].col == regmatch.endpos[0].col); // one char width - if (!result && inc(&pos) >= 0 && pos.col == regmatch.endpos[0].col) { + if (!result + && nmatched != 0 + && inc(&pos) >= 0 + && pos.col == regmatch.endpos[0].col) { result = true; } } -- cgit