From af23d173883f47fd02a9a380c719e4428370b484 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Tue, 7 Mar 2023 04:13:04 +0100 Subject: test: move oldtests to test directory (#22536) The new oldtest directory is in test/old/testdir. The reason for this is that many tests have hardcoded the parent directory name to be 'testdir'. --- scripts/vim-patch.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'scripts/vim-patch.sh') diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index f9f7330097..06ddf0f3b8 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -226,6 +226,10 @@ preprocess_patch() { local na_vimrcexample='vimrc_example\.vim' 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/runtime/\<\%('${na_vimrcexample}'\)\>@norm! d/\v(^diff)|%$ ' +w +q "$file" + # Rename src/testdir/ paths to test/old/testdir/ + LC_ALL=C sed -e 's/\( [ab]\)\/src\/testdir/\1\/test\/old\/testdir/g' \ + "$file" > "$file".tmp && mv "$file".tmp "$file" + # Rename src/ paths to src/nvim/ LC_ALL=C sed -e 's/\( [ab]\/src\)/\1\/nvim/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" -- cgit From 0e7edd70a95d962dfbe5b52c2767887a7131e0a0 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 8 Mar 2023 10:46:09 +0800 Subject: test(old): move memfile_test.c to test/old/ (#22567) --- scripts/vim-patch.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts/vim-patch.sh') diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index 06ddf0f3b8..20e337afcb 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -598,6 +598,7 @@ _set_missing_vimpatches() { # Massage arguments for git-log. declare -A git_log_replacements=( [^\(.*/\)?src/nvim/\(.*\)]="\${BASH_REMATCH[1]}src/\${BASH_REMATCH[2]}" + [^\(.*/\)?test/old/\(.*\)]="\${BASH_REMATCH[1]}src/\${BASH_REMATCH[2]}" [^\(.*/\)?\.vim-src/\(.*\)]="\${BASH_REMATCH[2]}" ) local i j -- cgit From c8c7912a4deed6351e77b42d42742d675f5d45c6 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 13 Apr 2023 19:07:42 +0800 Subject: build(vim-patch.sh): ignore test_behave.vim (#23062) --- scripts/vim-patch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/vim-patch.sh') diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index 20e337afcb..385005a442 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -212,7 +212,7 @@ preprocess_patch() { 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/testdir/\<\%('"${na_src_testdir}"'\)\>@norm! d/\v(^diff)|%$ ' +w +q "$file" # Remove testdir/test_*.vim files - local na_src_testdir='balloon.*\|channel.*\|crypt\.vim\|cscope\.vim\|gui.*\|hardcopy\.vim\|job_fails\.vim\|json\.vim\|mzscheme\.vim\|netbeans.*\|paste\.vim\|popupwin.*\|restricted\.vim\|shortpathname\.vim\|tcl\.vim\|terminal.*\|xxd\.vim' + local na_src_testdir='balloon.*\|behave\.vim\|channel.*\|crypt\.vim\|cscope\.vim\|gui.*\|hardcopy\.vim\|job_fails\.vim\|json\.vim\|mzscheme\.vim\|netbeans.*\|paste\.vim\|popupwin.*\|restricted\.vim\|shortpathname\.vim\|tcl\.vim\|terminal.*\|xxd\.vim' 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/testdir/\@norm! d/\v(^diff)|%$ ' +w +q "$file" # Remove version.c #7555 -- cgit From 84378c4dd56db9846b70a333530505a8048bd26e Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 9 May 2023 09:18:21 +0800 Subject: test(old): remove python2 tests (#23547) Because python2 provider is no longer supported. --- scripts/vim-patch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/vim-patch.sh') diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index 385005a442..df0af72fdb 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -212,7 +212,7 @@ preprocess_patch() { 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/testdir/\<\%('"${na_src_testdir}"'\)\>@norm! d/\v(^diff)|%$ ' +w +q "$file" # Remove testdir/test_*.vim files - local na_src_testdir='balloon.*\|behave\.vim\|channel.*\|crypt\.vim\|cscope\.vim\|gui.*\|hardcopy\.vim\|job_fails\.vim\|json\.vim\|mzscheme\.vim\|netbeans.*\|paste\.vim\|popupwin.*\|restricted\.vim\|shortpathname\.vim\|tcl\.vim\|terminal.*\|xxd\.vim' + local na_src_testdir='balloon.*\|behave\.vim\|channel.*\|crypt\.vim\|cscope\.vim\|gui.*\|hardcopy\.vim\|job_fails\.vim\|json\.vim\|mzscheme\.vim\|netbeans.*\|paste\.vim\|popupwin.*\|python2\.vim\|pyx2\.vim\|restricted\.vim\|shortpathname\.vim\|tcl\.vim\|terminal.*\|xxd\.vim' 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/testdir/\@norm! d/\v(^diff)|%$ ' +w +q "$file" # Remove version.c #7555 -- cgit From d3a22ff242526e36e6e5b76fdc70656dd3d7ca31 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 26 May 2023 22:22:56 +0800 Subject: build(vim-patch.sh): use bundled uncrustify (#23770) --- scripts/vim-patch.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/vim-patch.sh') diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index df0af72fdb..7af055640b 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -297,7 +297,7 @@ uncrustify_patch() { exit 1 } - local patch_path=$NVIM_SOURCE_DIR/build/vim_patch + local patch_path="$NVIM_SOURCE_DIR"/build/vim_patch rm -rf "$patch_path" mkdir -p "$patch_path"/{a,b} @@ -314,7 +314,7 @@ uncrustify_patch() { # than once. This is obviously a bug that needs to be fixed on uncrustify's # end, but in the meantime this workaround is sufficient. for _ in {1..2}; do - uncrustify -c "$NVIM_SOURCE_DIR"/src/uncrustify.cfg -q --replace --no-backup "$patch_path"/{a,b}/src/*.[ch] + "$NVIM_SOURCE_DIR"/build/usr/bin/uncrustify -c "$NVIM_SOURCE_DIR"/src/uncrustify.cfg -q --replace --no-backup "$patch_path"/{a,b}/src/*.[ch] done (cd "$patch_path" && (git --no-pager diff --no-index --no-prefix --patch --unified=5 --color=never a/ b/ || true)) @@ -328,7 +328,7 @@ get_vimpatch() { msg_ok "Found Vim revision '${vim_commit}'." local patch_content - if check_executable uncrustify; then + if check_executable "$NVIM_SOURCE_DIR"/build/usr/bin/uncrustify; then patch_content="$(uncrustify_patch "${vim_commit}")" else patch_content="$(git --no-pager show --unified=5 --color=never -1 --pretty=medium "${vim_commit}")" -- cgit From 3ce3218fb4b6acd45bc94c1cf4ccfe48bb1f7fa9 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 13 Aug 2023 10:34:25 +0800 Subject: build(vim-patch.sh): group co-authors together (#24686) --- scripts/vim-patch.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'scripts/vim-patch.sh') diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index 7af055640b..0fae27a3bf 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -119,10 +119,10 @@ get_vim_sources() { } commit_message() { - if [[ -n "$vim_tag" ]]; then - printf '%s\n\n%s\n\n%s' "${vim_message}" "${vim_commit_url}" "${vim_coauthor}" + if [[ "${vim_message}" == "vim-patch:${vim_version}:"* ]]; then + printf '%s\n\n%s\n\n%s' "${vim_message}" "${vim_commit_url}" "${vim_coauthors}" else - printf 'vim-patch:%s\n\n%s\n\n%s\n\n%s' "$vim_version" "$vim_message" "$vim_commit_url" "$vim_coauthor" + printf 'vim-patch:%s\n\n%s\n\n%s\n\n%s' "$vim_version" "$vim_message" "$vim_commit_url" "$vim_coauthors" fi } @@ -175,7 +175,13 @@ assign_commit_details() { vim_commit_url="https://github.com/vim/vim/commit/${vim_commit}" vim_message="$(git -C "${VIM_SOURCE_DIR}" log -1 --pretty='format:%B' "${vim_commit}" \ | sed -e 's/\(#[0-9]\{1,\}\)/vim\/vim\1/g')" - vim_coauthor="$(git -C "${VIM_SOURCE_DIR}" log -1 --pretty='format:Co-authored-by: %an <%ae>' "${vim_commit}")" + local coauthor0 + coauthor0="$(git -C "${VIM_SOURCE_DIR}" log -1 --pretty='format:Co-authored-by: %an <%ae>' "${vim_commit}")" + # Extract co-authors from the commit message. + vim_coauthors="$(echo "${vim_message}" | (grep -E '^Co-authored-by: ' || true) | (grep -Fxv "${coauthor0}" || true))" + vim_coauthors="$(echo "${coauthor0}"; echo "${vim_coauthors}")" + # Remove Co-authored-by and Signed-off-by lines from the commit message. + vim_message="$(echo "${vim_message}" | sed -e '/\(Co-authored\|Signed-off\)-by: /d')" if [[ ${munge_commit_line} == "true" ]]; then # Remove first line of commit message. vim_message="$(echo "${vim_message}" | sed -e '1s/^patch /vim-patch:/')" -- cgit From e551d623d207685dafbfdf950477bad5b0fa876d Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 13 Aug 2023 11:27:31 +0800 Subject: build(vim-patch.sh): rename locale.c to os/lang.c (#24687) --- scripts/vim-patch.sh | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) (limited to 'scripts/vim-patch.sh') diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index 0fae27a3bf..94ecc23413 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -175,13 +175,13 @@ assign_commit_details() { vim_commit_url="https://github.com/vim/vim/commit/${vim_commit}" vim_message="$(git -C "${VIM_SOURCE_DIR}" log -1 --pretty='format:%B' "${vim_commit}" \ | sed -e 's/\(#[0-9]\{1,\}\)/vim\/vim\1/g')" - local coauthor0 - coauthor0="$(git -C "${VIM_SOURCE_DIR}" log -1 --pretty='format:Co-authored-by: %an <%ae>' "${vim_commit}")" + local vim_coauthor0 + vim_coauthor0="$(git -C "${VIM_SOURCE_DIR}" log -1 --pretty='format:Co-authored-by: %an <%ae>' "${vim_commit}")" # Extract co-authors from the commit message. - vim_coauthors="$(echo "${vim_message}" | (grep -E '^Co-authored-by: ' || true) | (grep -Fxv "${coauthor0}" || true))" - vim_coauthors="$(echo "${coauthor0}"; echo "${vim_coauthors}")" + vim_coauthors="$(echo "${vim_message}" | (grep -E '^Co-authored-by: ' || true) | (grep -Fxv "${vim_coauthor0}" || true))" + vim_coauthors="$(echo "${vim_coauthor0}"; echo "${vim_coauthors}")" # Remove Co-authored-by and Signed-off-by lines from the commit message. - vim_message="$(echo "${vim_message}" | sed -e '/\(Co-authored\|Signed-off\)-by: /d')" + vim_message="$(echo "${vim_message}" | sed -e '/^\(Co-authored\|Signed-off\)-by: /d')" if [[ ${munge_commit_line} == "true" ]]; then # Remove first line of commit message. vim_message="$(echo "${vim_message}" | sed -e '1s/^patch /vim-patch:/')" @@ -241,43 +241,47 @@ preprocess_patch() { "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename evalfunc.c to eval/funcs.c - LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/evalfunc\.c/\1\/eval\/funcs\.c/g' \ + LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/evalfunc\.c/\1\/eval\/funcs.c/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename evalvars.c to eval/vars.c - LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/evalvars\.c/\1\/eval\/vars\.c/g' \ + LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/evalvars\.c/\1\/eval\/vars.c/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename userfunc.c to eval/userfunc.c - LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/userfunc\.c/\1\/eval\/userfunc\.c/g' \ + LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/userfunc\.c/\1\/eval\/userfunc.c/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename evalbuffer.c to eval/buffer.c - LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/evalbuffer\.c/\1\/eval\/buffer\.c/g' \ + LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/evalbuffer\.c/\1\/eval\/buffer.c/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename evalwindow.c to eval/window.c - LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/evalwindow\.c/\1\/eval\/window\.c/g' \ + LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/evalwindow\.c/\1\/eval\/window.c/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename map.c to mapping.c - LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/map\(\.[ch]\)/\1\/mapping\2/g' \ + LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/map\.c/\1\/mapping.c/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename profiler.c to profile.c - LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/profiler\(\.[ch]\)/\1\/profile\2/g' \ + LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/profiler\.c/\1\/profile.c/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename scriptfile.c to runtime.c - LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/scriptfile\(\.[ch]\)/\1\/runtime\2/g' \ + LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/scriptfile\.c/\1\/runtime.c/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename session.c to ex_session.c - LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/session\(\.[ch]\)/\1\/ex_session\2/g' \ + LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/session\.c/\1\/ex_session.c/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename highlight.c to highlight_group.c - LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/highlight\(\.[ch]\)/\1\/highlight_group\2/g' \ + LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/highlight\.c/\1\/highlight_group.c/g' \ + "$file" > "$file".tmp && mv "$file".tmp "$file" + + # Rename locale.c to os/lang.c + LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/locale\.c/\1\/os\/lang.c/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename keymap.h to keycodes.h @@ -289,11 +293,11 @@ preprocess_patch() { "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename test_urls.vim to check_urls.vim - LC_ALL=C sed -e 's@\( [ab]\)/runtime/doc/test\(_urls\.vim\)@\1/scripts/check\2@g' \ + LC_ALL=C sed -e 's/\( [ab]\)\/runtime\/doc\/test\(_urls\.vim\)/\1\/scripts\/check\2/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename path to check_colors.vim - LC_ALL=C sed -e 's@\( [ab]/runtime\)/colors/\(tools/check_colors\.vim\)@\1/\2@g' \ + LC_ALL=C sed -e 's/\( [ab]\/runtime\)\/colors\/\(tools\/check_colors\.vim\)/\1\/\2/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" } -- cgit From c0ac53e0d6a1e1fab38738e549200975ac0128a3 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 16 Aug 2023 08:50:11 +0800 Subject: build(vim-patch.sh): use sed -E for portable regexp (#24734) Also always use -e for consistency. --- scripts/vim-patch.sh | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'scripts/vim-patch.sh') diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index 94ecc23413..3f411dac49 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -174,17 +174,17 @@ assign_commit_details() { vim_commit_url="https://github.com/vim/vim/commit/${vim_commit}" vim_message="$(git -C "${VIM_SOURCE_DIR}" log -1 --pretty='format:%B' "${vim_commit}" \ - | sed -e 's/\(#[0-9]\{1,\}\)/vim\/vim\1/g')" + | sed -Ee 's/(#[0-9]{1,})/vim\/vim\1/g')" local vim_coauthor0 vim_coauthor0="$(git -C "${VIM_SOURCE_DIR}" log -1 --pretty='format:Co-authored-by: %an <%ae>' "${vim_commit}")" # Extract co-authors from the commit message. vim_coauthors="$(echo "${vim_message}" | (grep -E '^Co-authored-by: ' || true) | (grep -Fxv "${vim_coauthor0}" || true))" vim_coauthors="$(echo "${vim_coauthor0}"; echo "${vim_coauthors}")" # Remove Co-authored-by and Signed-off-by lines from the commit message. - vim_message="$(echo "${vim_message}" | sed -e '/^\(Co-authored\|Signed-off\)-by: /d')" + vim_message="$(echo "${vim_message}" | grep -Ev '^(Co-authored|Signed-off)-by: ')" if [[ ${munge_commit_line} == "true" ]]; then # Remove first line of commit message. - vim_message="$(echo "${vim_message}" | sed -e '1s/^patch /vim-patch:/')" + vim_message="$(echo "${vim_message}" | sed -Ee '1s/^patch /vim-patch:/')" fi patch_file="vim-${vim_version}.patch" } @@ -233,71 +233,71 @@ preprocess_patch() { 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/runtime/\<\%('${na_vimrcexample}'\)\>@norm! d/\v(^diff)|%$ ' +w +q "$file" # Rename src/testdir/ paths to test/old/testdir/ - LC_ALL=C sed -e 's/\( [ab]\)\/src\/testdir/\1\/test\/old\/testdir/g' \ + LC_ALL=C sed -Ee 's/( [ab])\/src\/testdir/\1\/test\/old\/testdir/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename src/ paths to src/nvim/ - LC_ALL=C sed -e 's/\( [ab]\/src\)/\1\/nvim/g' \ + LC_ALL=C sed -Ee 's/( [ab]\/src)/\1\/nvim/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename evalfunc.c to eval/funcs.c - LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/evalfunc\.c/\1\/eval\/funcs.c/g' \ + LC_ALL=C sed -Ee 's/( [ab]\/src\/nvim)\/evalfunc\.c/\1\/eval\/funcs.c/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename evalvars.c to eval/vars.c - LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/evalvars\.c/\1\/eval\/vars.c/g' \ + LC_ALL=C sed -Ee 's/( [ab]\/src\/nvim)\/evalvars\.c/\1\/eval\/vars.c/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename userfunc.c to eval/userfunc.c - LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/userfunc\.c/\1\/eval\/userfunc.c/g' \ + LC_ALL=C sed -Ee 's/( [ab]\/src\/nvim)\/userfunc\.c/\1\/eval\/userfunc.c/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename evalbuffer.c to eval/buffer.c - LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/evalbuffer\.c/\1\/eval\/buffer.c/g' \ + LC_ALL=C sed -Ee 's/( [ab]\/src\/nvim)\/evalbuffer\.c/\1\/eval\/buffer.c/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename evalwindow.c to eval/window.c - LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/evalwindow\.c/\1\/eval\/window.c/g' \ + LC_ALL=C sed -Ee 's/( [ab]\/src\/nvim)\/evalwindow\.c/\1\/eval\/window.c/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename map.c to mapping.c - LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/map\.c/\1\/mapping.c/g' \ + LC_ALL=C sed -Ee 's/( [ab]\/src\/nvim)\/map\.c/\1\/mapping.c/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename profiler.c to profile.c - LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/profiler\.c/\1\/profile.c/g' \ + LC_ALL=C sed -Ee 's/( [ab]\/src\/nvim)\/profiler\.c/\1\/profile.c/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename scriptfile.c to runtime.c - LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/scriptfile\.c/\1\/runtime.c/g' \ + LC_ALL=C sed -Ee 's/( [ab]\/src\/nvim)\/scriptfile\.c/\1\/runtime.c/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename session.c to ex_session.c - LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/session\.c/\1\/ex_session.c/g' \ + LC_ALL=C sed -Ee 's/( [ab]\/src\/nvim)\/session\.c/\1\/ex_session.c/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename highlight.c to highlight_group.c - LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/highlight\.c/\1\/highlight_group.c/g' \ + LC_ALL=C sed -Ee 's/( [ab]\/src\/nvim)\/highlight\.c/\1\/highlight_group.c/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename locale.c to os/lang.c - LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/locale\.c/\1\/os\/lang.c/g' \ + LC_ALL=C sed -Ee 's/( [ab]\/src\/nvim)\/locale\.c/\1\/os\/lang.c/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename keymap.h to keycodes.h - LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/keymap\.h/\1\/keycodes.h/g' \ + LC_ALL=C sed -Ee 's/( [ab]\/src\/nvim)\/keymap\.h/\1\/keycodes.h/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename terminal.txt to nvim_terminal_emulator.txt - LC_ALL=C sed -e 's/\( [ab]\/runtime\/doc\)\/terminal\.txt/\1\/nvim_terminal_emulator.txt/g' \ + LC_ALL=C sed -Ee 's/( [ab]\/runtime\/doc)\/terminal\.txt/\1\/nvim_terminal_emulator.txt/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename test_urls.vim to check_urls.vim - LC_ALL=C sed -e 's/\( [ab]\)\/runtime\/doc\/test\(_urls\.vim\)/\1\/scripts\/check\2/g' \ + LC_ALL=C sed -Ee 's/( [ab])\/runtime\/doc\/test(_urls\.vim)/\1\/scripts\/check\2/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename path to check_colors.vim - LC_ALL=C sed -e 's/\( [ab]\/runtime\)\/colors\/\(tools\/check_colors\.vim\)/\1\/\2/g' \ + LC_ALL=C sed -Ee 's/( [ab]\/runtime)\/colors\/(tools\/check_colors\.vim)/\1\/\2/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" } @@ -536,7 +536,7 @@ list_vimpatch_tokens() { | grep -oE 'vim-patch:[^ ,{:]{7,}' \ | sort \ | uniq \ - | sed -nE 's/^(vim-patch:([0-9]+\.[^ ]+|[0-9a-z]{7,7})).*/\1/p' + | sed -nEe 's/^(vim-patch:([0-9]+\.[^ ]+|[0-9a-z]{7,7})).*/\1/p' } # Prints all patch-numbers (for the current v:version) for which there is @@ -544,7 +544,7 @@ list_vimpatch_tokens() { list_vimpatch_numbers() { # Transform "vim-patch:X.Y.ZZZZ" to "ZZZZ". list_vimpatch_tokens | while read -r vimpatch_token; do - echo "$vimpatch_token" | grep '8\.1\.' | sed -E 's/.*vim-patch:8\.1\.([0-9a-z]+).*/\1/' + echo "$vimpatch_token" | grep -F '8.1.' | sed -Ee 's/.*vim-patch:8\.1\.([0-9a-z]+).*/\1/' done } @@ -669,7 +669,7 @@ show_vimpatches() { printf "Vim patches missing from Neovim:\n" local -A runtime_commits - for commit in $(git -C "${VIM_SOURCE_DIR}" log --format="%H %D" -- runtime | sed 's/,\? tag: / /g'); do + for commit in $(git -C "${VIM_SOURCE_DIR}" log --format="%H %D" -- runtime | sed -Ee 's/,\? tag: / /g'); do runtime_commits[$commit]=1 done @@ -763,7 +763,7 @@ review_commit() { local nvim_patch nvim_patch="$(curl -Ssf "${nvim_patch_url}")" local vim_version - vim_version="$(head -n 4 <<< "${nvim_patch}" | sed -n 's/'"${git_patch_prefix}"'vim-patch:\([a-z0-9.]*\)\(:.*\)\{0,1\}$/\1/p')" + vim_version="$(head -n 4 <<< "${nvim_patch}" | sed -nEe 's/'"${git_patch_prefix}"'vim-patch:([a-z0-9.]*)(:.*){0,1}$/\1/p')" echo if [[ -n "${vim_version}" ]]; then -- cgit From 08fa71fd274530be23b6ae6b10222afee0b57522 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 23 Aug 2023 19:32:11 +0800 Subject: vim-patch:9.0.1773: cannot distinguish Forth and Fortran *.f files (#24841) Problem: cannot distinguish Forth and Fortran *.f files Solution: Add Filetype detection Code Also add *.4th as a Forth filetype closes: vim/vim#12251 https://github.com/vim/vim/commit/19a3bc3addf9b4aa8150a01b11b4249c67d15d3b Don't remove filetype files from Vim patches: - filetype.vim, script.vim, ft.vim usually contain useful changes - script.vim and ft.vim don't even have their paths spelled correctly Co-authored-by: Doug Kearns --- scripts/vim-patch.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/vim-patch.sh') diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index 3f411dac49..af73a8006a 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -202,9 +202,9 @@ preprocess_patch() { local na_src='auto\|configure.*\|GvimExt\|hardcopy.*\|libvterm\|proto\|tee\|VisVim\|xpm\|xxd\|Make.*\|INSTALL.*\|beval.*\|gui.*\|if_cscop\|if_lua\|if_mzsch\|if_olepp\|if_ole\|if_perl\|if_py\|if_ruby\|if_tcl\|if_xcmdsrv' 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/\S*\<\%(testdir/\)\@@norm! d/\v(^diff)|%$ ' +w +q "$file" - # Remove runtime files ported to Lua. - local na_rt='filetype\.vim\|scripts\.vim\|autoload\/ft\/dist\.vim\|print\/.*' - 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/runtime/\<\%('"${na_rt}"'\)\>@norm! d/\v(^diff)|%$ ' +w +q "$file" + # Remove runtime/print/ + local na_rt='print\/.*' + 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/runtime/\<\%('"${na_rt}"'\)\>@norm! d/\v(^diff)|%$' +w +q "$file" # Remove unwanted Vim doc files. local na_doc='channel\.txt\|if_cscop\.txt\|netbeans\.txt\|os_\w\+\.txt\|print\.txt\|term\.txt\|todo\.txt\|version\d\.txt\|vim9\.txt\|sponsor\.txt\|intro\.txt\|tags' -- cgit From acb868bf84246982883b9fc43fee6487be7c7c60 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 8 Sep 2023 06:56:57 +0800 Subject: build(vim-patch.sh): dereference annotated tags when listing (#25042) --- scripts/vim-patch.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'scripts/vim-patch.sh') diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index af73a8006a..42b54d6c05 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -565,10 +565,8 @@ _set_tokens_and_tags() { # Create an associative array mapping Vim commits to tags. eval "vim_commit_tags=( - $(git -C "${VIM_SOURCE_DIR}" for-each-ref refs/tags \ - --format '[%(objectname)]=%(refname:strip=2)' \ - --sort='-*authordate' \ - --shell) + $(git -C "${VIM_SOURCE_DIR}" show-ref --tags --dereference \ + | sed -nEe 's/^([0-9a-f]+) refs\/tags\/(v[0-9.]+)(\^\{\})?$/\1 \2/p') )" # Exit in case of errors from the above eval (empty vim_commit_tags). if ! (( "${#vim_commit_tags[@]}" )); then -- cgit From 3d2c9102e90ed2cb5d9d344ffb2777f98e2e37f1 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 8 Sep 2023 07:28:46 +0800 Subject: build(vim-patch.sh): use older associative array syntax --- scripts/vim-patch.sh | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'scripts/vim-patch.sh') diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index 42b54d6c05..e7eaa0b830 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -196,11 +196,13 @@ preprocess_patch() { # Remove Filelist, README local na_files='Filelist\|README.*' - 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/\<\%('"${na_files}"'\)\>@norm! d/\v(^diff)|%$ ' +w +q "$file" + 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/\<\%('"${na_files}"'\)\>@norm! d/\v(^diff)|%$ +' +w +q "$file" # Remove *.proto, Make*, INSTALL*, gui_*, beval.*, some if_*, gvim, libvterm, tee, VisVim, xpm, xxd local na_src='auto\|configure.*\|GvimExt\|hardcopy.*\|libvterm\|proto\|tee\|VisVim\|xpm\|xxd\|Make.*\|INSTALL.*\|beval.*\|gui.*\|if_cscop\|if_lua\|if_mzsch\|if_olepp\|if_ole\|if_perl\|if_py\|if_ruby\|if_tcl\|if_xcmdsrv' - 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/\S*\<\%(testdir/\)\@@norm! d/\v(^diff)|%$ ' +w +q "$file" + 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/\S*\<\%(testdir/\)\@@norm! d/\v(^diff)|%$ +' +w +q "$file" # Remove runtime/print/ local na_rt='print\/.*' @@ -208,29 +210,35 @@ preprocess_patch() { # Remove unwanted Vim doc files. local na_doc='channel\.txt\|if_cscop\.txt\|netbeans\.txt\|os_\w\+\.txt\|print\.txt\|term\.txt\|todo\.txt\|version\d\.txt\|vim9\.txt\|sponsor\.txt\|intro\.txt\|tags' - 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/runtime/doc/\<\%('"${na_doc}"'\)\>@norm! d/\v(^diff)|%$ ' +w +q "$file" + 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/runtime/doc/\<\%('"${na_doc}"'\)\>@norm! d/\v(^diff)|%$ +' +w +q "$file" # Remove "Last change ..." changes in doc files. 2>/dev/null $nvim --cmd 'set dir=/tmp' +'%s/^@@.*\n.*For Vim version.*Last change.*\n.*For Vim version.*Last change.*//' +w +q "$file" # Remove gui, option, setup, screen dumps, testdir/Make_*.mak files local na_src_testdir='gen_opt_test\.vim\|gui_.*\|Make_amiga\.mak\|Make_dos\.mak\|Make_ming\.mak\|Make_vms\.mms\|dumps/.*\.dump\|setup_gui\.vim' - 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/testdir/\<\%('"${na_src_testdir}"'\)\>@norm! d/\v(^diff)|%$ ' +w +q "$file" + 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/testdir/\<\%('"${na_src_testdir}"'\)\>@norm! d/\v(^diff)|%$ +' +w +q "$file" # Remove testdir/test_*.vim files local na_src_testdir='balloon.*\|behave\.vim\|channel.*\|crypt\.vim\|cscope\.vim\|gui.*\|hardcopy\.vim\|job_fails\.vim\|json\.vim\|mzscheme\.vim\|netbeans.*\|paste\.vim\|popupwin.*\|python2\.vim\|pyx2\.vim\|restricted\.vim\|shortpathname\.vim\|tcl\.vim\|terminal.*\|xxd\.vim' - 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/testdir/\@norm! d/\v(^diff)|%$ ' +w +q "$file" + 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/testdir/\@norm! d/\v(^diff)|%$ +' +w +q "$file" # Remove version.c #7555 - 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/\<\%(version\.c\)\>@norm! d/\v(^diff)|%$ ' +w +q "$file" + 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/\<\%(version\.c\)\>@norm! d/\v(^diff)|%$ +' +w +q "$file" # Remove some *.po files. #5622 local na_po='sjiscorr\.c\|ja\.sjis\.po\|ko\.po\|pl\.cp1250\.po\|pl\.po\|ru\.cp1251\.po\|uk\.cp1251\.po\|zh_CN\.cp936\.po\|zh_CN\.po\|zh_TW\.po' - 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/po/\<\%('${na_po}'\)\>@norm! d/\v(^diff)|%$ ' +w +q "$file" + 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/po/\<\%('${na_po}'\)\>@norm! d/\v(^diff)|%$ +' +w +q "$file" # Remove vimrc_example.vim local na_vimrcexample='vimrc_example\.vim' - 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/runtime/\<\%('${na_vimrcexample}'\)\>@norm! d/\v(^diff)|%$ ' +w +q "$file" + 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/runtime/\<\%('${na_vimrcexample}'\)\>@norm! d/\v(^diff)|%$ +' +w +q "$file" # Rename src/testdir/ paths to test/old/testdir/ LC_ALL=C sed -Ee 's/( [ab])\/src\/testdir/\1\/test\/old\/testdir/g' \ @@ -566,7 +574,7 @@ _set_tokens_and_tags() { # Create an associative array mapping Vim commits to tags. eval "vim_commit_tags=( $(git -C "${VIM_SOURCE_DIR}" show-ref --tags --dereference \ - | sed -nEe 's/^([0-9a-f]+) refs\/tags\/(v[0-9.]+)(\^\{\})?$/\1 \2/p') + | sed -nEe 's/^([0-9a-f]+) refs\/tags\/(v[0-9.]+)(\^\{\})?$/["\1"]="\2"/p') )" # Exit in case of errors from the above eval (empty vim_commit_tags). if ! (( "${#vim_commit_tags[@]}" )); then -- cgit From 6a8b48e24cbe070846dd1d234553b3fdeb19460e Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 8 Sep 2023 07:51:53 +0800 Subject: build(vim-patch.sh): don't use control chars in command (#25044) --- scripts/vim-patch.sh | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) (limited to 'scripts/vim-patch.sh') diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index e7eaa0b830..8b061add0d 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -196,49 +196,41 @@ preprocess_patch() { # Remove Filelist, README local na_files='Filelist\|README.*' - 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/\<\%('"${na_files}"'\)\>@norm! d/\v(^diff)|%$ -' +w +q "$file" + 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/\<\%('"${na_files}"'\)\>@exe "norm! d/\\v(^diff)|%$\r"' +w +q "$file" # Remove *.proto, Make*, INSTALL*, gui_*, beval.*, some if_*, gvim, libvterm, tee, VisVim, xpm, xxd local na_src='auto\|configure.*\|GvimExt\|hardcopy.*\|libvterm\|proto\|tee\|VisVim\|xpm\|xxd\|Make.*\|INSTALL.*\|beval.*\|gui.*\|if_cscop\|if_lua\|if_mzsch\|if_olepp\|if_ole\|if_perl\|if_py\|if_ruby\|if_tcl\|if_xcmdsrv' - 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/\S*\<\%(testdir/\)\@@norm! d/\v(^diff)|%$ -' +w +q "$file" + 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/\S*\<\%(testdir/\)\@@exe "norm! d/\\v(^diff)|%$\r"' +w +q "$file" # Remove runtime/print/ local na_rt='print\/.*' - 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/runtime/\<\%('"${na_rt}"'\)\>@norm! d/\v(^diff)|%$' +w +q "$file" + 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/runtime/\<\%('"${na_rt}"'\)\>@exe "norm! d/\\v(^diff)|%$\r"' +w +q "$file" # Remove unwanted Vim doc files. local na_doc='channel\.txt\|if_cscop\.txt\|netbeans\.txt\|os_\w\+\.txt\|print\.txt\|term\.txt\|todo\.txt\|version\d\.txt\|vim9\.txt\|sponsor\.txt\|intro\.txt\|tags' - 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/runtime/doc/\<\%('"${na_doc}"'\)\>@norm! d/\v(^diff)|%$ -' +w +q "$file" + 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/runtime/doc/\<\%('"${na_doc}"'\)\>@exe "norm! d/\\v(^diff)|%$\r"' +w +q "$file" # Remove "Last change ..." changes in doc files. 2>/dev/null $nvim --cmd 'set dir=/tmp' +'%s/^@@.*\n.*For Vim version.*Last change.*\n.*For Vim version.*Last change.*//' +w +q "$file" # Remove gui, option, setup, screen dumps, testdir/Make_*.mak files local na_src_testdir='gen_opt_test\.vim\|gui_.*\|Make_amiga\.mak\|Make_dos\.mak\|Make_ming\.mak\|Make_vms\.mms\|dumps/.*\.dump\|setup_gui\.vim' - 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/testdir/\<\%('"${na_src_testdir}"'\)\>@norm! d/\v(^diff)|%$ -' +w +q "$file" + 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/testdir/\<\%('"${na_src_testdir}"'\)\>@exe "norm! d/\\v(^diff)|%$\r"' +w +q "$file" # Remove testdir/test_*.vim files local na_src_testdir='balloon.*\|behave\.vim\|channel.*\|crypt\.vim\|cscope\.vim\|gui.*\|hardcopy\.vim\|job_fails\.vim\|json\.vim\|mzscheme\.vim\|netbeans.*\|paste\.vim\|popupwin.*\|python2\.vim\|pyx2\.vim\|restricted\.vim\|shortpathname\.vim\|tcl\.vim\|terminal.*\|xxd\.vim' - 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/testdir/\@norm! d/\v(^diff)|%$ -' +w +q "$file" + 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/testdir/\@exe "norm! d/\\v(^diff)|%$\r"' +w +q "$file" # Remove version.c #7555 - 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/\<\%(version\.c\)\>@norm! d/\v(^diff)|%$ -' +w +q "$file" + 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/\<\%(version\.c\)\>@exe "norm! d/\\v(^diff)|%$\r"' +w +q "$file" # Remove some *.po files. #5622 local na_po='sjiscorr\.c\|ja\.sjis\.po\|ko\.po\|pl\.cp1250\.po\|pl\.po\|ru\.cp1251\.po\|uk\.cp1251\.po\|zh_CN\.cp936\.po\|zh_CN\.po\|zh_TW\.po' - 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/po/\<\%('${na_po}'\)\>@norm! d/\v(^diff)|%$ -' +w +q "$file" + 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/po/\<\%('${na_po}'\)\>@exe "norm! d/\\v(^diff)|%$\r"+' +w +q "$file" # Remove vimrc_example.vim local na_vimrcexample='vimrc_example\.vim' - 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/runtime/\<\%('${na_vimrcexample}'\)\>@norm! d/\v(^diff)|%$ -' +w +q "$file" + 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/runtime/\<\%('${na_vimrcexample}'\)\>@exe "norm! d/\\v(^diff)|%$\r"+' +w +q "$file" # Rename src/testdir/ paths to test/old/testdir/ LC_ALL=C sed -Ee 's/( [ab])\/src\/testdir/\1\/test\/old\/testdir/g' \ -- cgit From dc6d0d2daf69e2fdadda81feb97906dbc962a239 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 30 Sep 2023 14:41:34 +0800 Subject: refactor: reorganize option header files (#25437) - Move vimoption_T to option.h - option_defs.h is for option-related types - option_vars.h corresponds to Vim's option.h - option_defs.h and option_vars.h don't include each other --- scripts/vim-patch.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'scripts/vim-patch.sh') diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index 8b061add0d..478415376a 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -288,6 +288,10 @@ preprocess_patch() { LC_ALL=C sed -Ee 's/( [ab]\/src\/nvim)\/keymap\.h/\1\/keycodes.h/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" + # Rename option.h to option_vars.h + LC_ALL=C sed -Ee 's/( [ab]\/src\/nvim)\/option\.h/\1\/option_vars.h/g' \ + "$file" > "$file".tmp && mv "$file".tmp "$file" + # Rename terminal.txt to nvim_terminal_emulator.txt LC_ALL=C sed -Ee 's/( [ab]\/runtime\/doc)\/terminal\.txt/\1\/nvim_terminal_emulator.txt/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" -- cgit From 3a1bf826ff62fdfca2444c51f9eca85fade3d020 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 13 Nov 2023 00:40:34 -0800 Subject: vim-patch: mark N/A 8.1 patches #26008 Problem: Numerous Vim 8.1 patches are listed by `vim-patch.sh -l`. Solution: Mark the following patches as N/A: obviated by $NVIM env var: vim-patch:8.1.0049 shell cannot tell running in a terminal window vim-patch:8.1.0050 $VIM_TERMINAL is also set when not in a terminal window 'termwinkey' is not supported by Nvim: vim-patch:8.1.0072 use of 'termwinkey' is inconsistent Nvim handles STOP signal via libuv: vim-patch:8.1.0304 no redraw when using a STOP signal on Vim and then CONT vim-patch:8.1.0312 wrong type for flags used in signal handlers Nvim does not have `parse_queued_messages`: vim-patch:8.1.0367 getchar(1) no longer processes pending messages N/A various: vim-patch:8.1.1396 'wincolor' does not apply to lines below the buffer vim-patch:8.1.1502 cannot play any sound vim-patch:8.1.1515 memory leak reported for sound when build with EXITFREE Nvim has extmarks instead of textprops: vim-patch:8.1.0579 cannot attach properties to text vim-patch:8.1.0582 text properties are not enabled vim-patch:8.1.0634 text properties cannot cross line boundaries vim-patch:8.1.0638 text property highlighting is off by one column vim-patch:8.1.0639 text properties test fails on MS-Windows vim-patch:8.1.0643 computing byte offset wrong vim-patch:8.1.0654 when deleting a line text property flags are not adjusted vim-patch:8.1.0655 when appending a line text property flags are not added vim-patch:8.1.0663 text property display wrong when 'number' is set vim-patch:8.1.0665 text property display wrong when 'spell' is set vim-patch:8.1.0667 textprop test leaves file behind vim-patch:8.1.0675 text property column in screen columns is not practical vim-patch:8.1.0676 textprop screendump test fails vim-patch:8.1.0681 text properties as not adjusted for deleted text vim-patch:8.1.0682 text properties not adjusted when backspacing replaced text vim-patch:8.1.0688 text properties are not restored by undo vim-patch:8.1.0689 undo with text properties not tested vim-patch:8.1.0690 setline() and setbufline() do not clear text properties vim-patch:8.1.0691 text properties are not adjusted for :substitute vim-patch:8.1.0694 when using text props may free memory that is not allocated vim-patch:8.1.0703 compiler warnings with 64-bit compiler vim-patch:8.1.0707 text property columns are not adjusted for changed indent vim-patch:8.1.0970 text properties test fails when 'encoding' is not utf-8 vim-patch:8.1.1035 prop_remove() second argument is not optional vim-patch:8.1.1276 cannot combine text properties with syntax highlighting vim-patch:8.1.1278 missing change for "combine" field vim-patch:8.1.1333 text properties don't always move after changes vim-patch:8.1.1337 get empty text prop when splitting line just after text prop vim-patch:8.1.1341 text properties are lost when joining lines vim-patch:8.1.1343 text properties not adjusted for Visual block mode delete vim-patch:8.1.1340 attributes from 'cursorline' overwrite textprop vim-patch:8.1.1351 text property wrong after :substitute vim-patch:8.1.1359 text property wrong after :substitute with backslash vim-patch:8.1.1387 calling prop_add() in an empty buffer doesn't work vim-patch:8.1.1388 errors when calling prop_remove() for an unloaded buffer vim-patch:8.1.1463 gcc warns for uninitialized variable N/A Nvim has buf_attach instead of "listeners": vim-patch:8.1.1320 it is not possible to track changes to a buffer vim-patch:8.1.1321 no docs or tests for listener functions vim-patch:8.1.1326 no test for listener with partial vim-patch:8.1.1328 no test for listener with undo operation vim-patch:8.1.1332 cannot flush listeners without redrawing, mix of changes vim-patch:8.1.1335 listener callback is called after inserting text vim-patch:8.1.1419 listener callbacks may be called recursively vim-patch:8.1.1486 a listener change is merged even when it adds a line N/A build issues: vim-patch:8.1.0601 a few compiler warnings vim-patch:8.1.0612 cannot use two global runtime dirs with configure vim-patch:8.1.0684 warnings from 64-bit compiler vim-patch:8.1.1344 Coverity complains about possibly using a NULL pointer vim-patch:8.1.1376 warnings for size_t/int mixups vim-patch:8.1.1414 alloc() returning "char_u *" causes a lot of type casts vim-patch:8.1.1508 sound keeps failing on Travis vim-patch:8.1.1494 build failure N/A terminal / job control patches: vim-patch:8.1.0761 default value for brief_wait is wrong vim-patch:8.1.0824 SunOS/Solaris has a problem with ttys vim-patch:8.1.0845 having job_status() free the job causes problems vim-patch:8.1.0870 Vim doesn't use the new ConPTY support in Windows 10 vim-patch:8.1.0880 MS-Windows: inconsistent selection of winpty/conpty vim-patch:8.1.0890 pty allocation wrong if using file for out channel vim-patch:8.1.0906 using clumsy way to get console window handle vim-patch:8.1.0909 MS-Windows: using ConPTY even though it is not stable vim-patch:8.1.0928 stray log function call vim-patch:8.1.0940 MS-Windows console resizing not handled properly vim-patch:8.1.1028 MS-Windows: memory leak when creating terminal fails vim-patch:8.1.1265 when GPM mouse support is enabled double clicks do not work vim-patch:8.1.1267 cannot check if GPM mouse support is working N/A encoding patches: vim-patch:8.1.0879 MS-Windows: temp name encoding can be wrong vim-patch:8.1.0895 MS-Windows: dealing with temp name encoding not quite right vim-patch:8.1.0918 MS-Windows: startup messages are not converted vim-patch:8.1.1090 MS-Windows: modify_fname() has problems with some 'encoding' N/A platform patches: vim-patch:8.1.1103 MS-Windows: old API calls are no longer needed N/A Lua patches: vim-patch:8.1.1019 Lua: may garbage collect function reference in use N/A Nvim has floating windows instead of popup window: vim-patch:8.1.1329 plans for popup window support are spread out vim-patch:8.1.1364 design for popup window support needs more details vim-patch:8.1.1391 no popup window support vim-patch:8.1.1400 using global pointer for tab-local popups is clumsy vim-patch:8.1.1399 popup windows not adjusted when switching tabs vim-patch:8.1.0062 popup menu broken if a callback changes the window layout vim-patch:8.1.1405 "highlight" option of popup windows not supported vim-patch:8.1.1406 popup_hide() and popup_show() not implemented yet vim-patch:8.1.1407 popup_create() does not support text properties vim-patch:8.1.1410 popup_move() is not implemented yet vim-patch:8.1.1402 "timer" option of popup windows not supported vim-patch:8.1.1408 PFL_HIDDEN conflicts with system header file vim-patch:8.1.1420 popup window size only uses first line length vim-patch:8.1.1421 drawing "~" line in popup window vim-patch:8.1.1422 popup_getoptions() not implemented yet vim-patch:8.1.1423 popup windows use options from current window and buffer vim-patch:8.1.1426 no test for syntax highlight in popup window vim-patch:8.1.1427 popup window screenshot test fails vim-patch:8.1.1428 popup_atcursor() not implemented yet vim-patch:8.1.1429 "pos" option of popup window not supported yet vim-patch:8.1.1430 popup window option "wrap" not supported vim-patch:8.1.1431 popup window listed as "Scratch" vim-patch:8.1.1432 can't build with eval feature vim-patch:8.1.1438 some commands cause trouble in a popup window vim-patch:8.1.1441 popup window filter not yet implemented vim-patch:8.1.1442 popup windows not considered when the Vim window is resized vim-patch:8.1.1443 popup window padding and border not implemented yet vim-patch:8.1.1444 not using double line characters for popup border vim-patch:8.1.1445 popup window border highlight not implemented yet vim-patch:8.1.1446 popup window callback not implemented yet vim-patch:8.1.1447 not allowed to create an empty popup vim-patch:8.1.1448 statusline is sometimes drawn on top of popup vim-patch:8.1.1449 popup text truncated at end of screen vim-patch:8.1.1450 popup window positioning wrong when using padding or borders vim-patch:8.1.1451 CTRL-L does not clear screen with a popup window vim-patch:8.1.1452 line and col property of popup windows not properly checked vim-patch:8.1.1453 popup window "moved" property not implemented yet vim-patch:8.1.1455 popup_atcursor() not completely implemented vim-patch:8.1.1459 popup window border looks bad when 'ambiwidth' is "double" vim-patch:8.1.1460 popup window border characters may be wrong vim-patch:8.1.1416 popup_getposition() not implemented yet vim-patch:8.1.1493 redrawing with popups is slow and causes flicker vim-patch:8.1.1496 popup window height is not recomputed vim-patch:8.1.1499 ruler not updated after popup window was removed vim-patch:8.1.1511 matches in a popup window are not displayed properly vim-patch:8.1.1513 all popup functionality is in functions, except :popupclear vim-patch:8.1.1517 when a popup changes all windows are redrawn vim-patch:8.1.1518 crash when setting 'columns' while a popup is visible vim-patch:8.1.1520 popup windows are ignored when dealing with mouse position vim-patch:8.1.1521 when a popup window is closed the buffer remains vim-patch:8.1.1522 poup_notification() not implemented yet vim-patch:8.1.1495 memory access error vim-patch:8.1.1497 accessing memory beyond allocated space N/A already applied: vim-patch:8.1.1226 {not in Vi} remarks get in the way of useful help text vim-patch:8.1.1280 remarks about functionality not in Vi clutters the help --- scripts/vim-patch.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'scripts/vim-patch.sh') diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index 478415376a..47c6d293bc 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -218,11 +218,12 @@ preprocess_patch() { 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/testdir/\<\%('"${na_src_testdir}"'\)\>@exe "norm! d/\\v(^diff)|%$\r"' +w +q "$file" # Remove testdir/test_*.vim files - local na_src_testdir='balloon.*\|behave\.vim\|channel.*\|crypt\.vim\|cscope\.vim\|gui.*\|hardcopy\.vim\|job_fails\.vim\|json\.vim\|mzscheme\.vim\|netbeans.*\|paste\.vim\|popupwin.*\|python2\.vim\|pyx2\.vim\|restricted\.vim\|shortpathname\.vim\|tcl\.vim\|terminal.*\|xxd\.vim' + local na_src_testdir='balloon.*\|behave\.vim\|channel.*\|crypt\.vim\|cscope\.vim\|gui.*\|hardcopy\.vim\|job_fails\.vim\|json\.vim\|listener\.vim\|mzscheme\.vim\|netbeans.*\|paste\.vim\|popupwin.*\|python2\.vim\|pyx2\.vim\|restricted\.vim\|shortpathname\.vim\|sound\.vim\|tcl\.vim\|terminal.*\|xxd\.vim' 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/testdir/\@exe "norm! d/\\v(^diff)|%$\r"' +w +q "$file" - # Remove version.c #7555 - 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/\<\%(version\.c\)\>@exe "norm! d/\\v(^diff)|%$\r"' +w +q "$file" + # Remove N/A src/*.[ch] files: sound.c, version.c + local na_src_c='sound\|version' + 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/\<\%('"${na_src_c}"'\)\.[ch]\>@exe "norm! d/\\v(^diff)|%$\r"' +w +q "$file" # Remove some *.po files. #5622 local na_po='sjiscorr\.c\|ja\.sjis\.po\|ko\.po\|pl\.cp1250\.po\|pl\.po\|ru\.cp1251\.po\|uk\.cp1251\.po\|zh_CN\.cp936\.po\|zh_CN\.po\|zh_TW\.po' -- cgit