!125 [sync] PR-121: fix garbled characters display when file name matches
Merge pull request !125 from openeuler-sync-bot/sync-pr121-openEuler-22.03-LTS-to-openEuler-22.03-LTS-Next
This commit is contained in:
commit
d3fc029884
@ -0,0 +1,37 @@
|
|||||||
|
From 150fab01a9e9eb61061bf145998b608c5c9c470e Mon Sep 17 00:00:00 2001
|
||||||
|
From: lvying6 <lvying6@huawei.com>
|
||||||
|
Date: Tue, 14 Jul 2020 16:43:33 +0800
|
||||||
|
Subject: [PATCH] vim: fix garbled characters display when file name matches
|
||||||
|
warning or error in tar file
|
||||||
|
|
||||||
|
Reference: https://github.com/vim/vim/issues/6425
|
||||||
|
|
||||||
|
The problem is, the tar.vim plugin checks if the last line matches
|
||||||
|
warning or error or a few other keywords and if it does, it aborts.
|
||||||
|
|
||||||
|
Signed-off-by: lvying6 <lvying6@huawei.com>
|
||||||
|
---
|
||||||
|
runtime/autoload/tar.vim | 7 ++++++-
|
||||||
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/runtime/autoload/tar.vim b/runtime/autoload/tar.vim
|
||||||
|
index dc670db..168a2f1 100644
|
||||||
|
--- a/runtime/autoload/tar.vim
|
||||||
|
+++ b/runtime/autoload/tar.vim
|
||||||
|
@@ -184,7 +184,12 @@ fun! tar#Browse(tarfile)
|
||||||
|
" call Dret("tar#Browse : a:tarfile<".a:tarfile.">")
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
- if line("$") == curlast || ( line("$") == (curlast + 1) && getline("$") =~ '\c\%(warning\|error\|inappropriate\|unrecognized\)')
|
||||||
|
+ " If there was an error message, the last line probably matches some keywords but
|
||||||
|
+ " should also contain whitespace for readability. Make sure not to match a
|
||||||
|
+ " filename that contains the keyword (error/warning/unrecognized/inappropriate, etc)
|
||||||
|
+ if line("$") == curlast || ( line("$") == (curlast + 1) &&
|
||||||
|
+ \ getline("$") =~# '\c\<\%(warning\|error\|inappropriate\|unrecognized\)\>' &&
|
||||||
|
+ \ getline("$") =~ '\s' )
|
||||||
|
redraw!
|
||||||
|
echohl WarningMsg | echo "***warning*** (tar#Browse) ".a:tarfile." doesn't appear to be a tar file" | echohl None
|
||||||
|
keepj sil! %d
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
||||||
9
vim.spec
9
vim.spec
@ -12,7 +12,7 @@
|
|||||||
Name: vim
|
Name: vim
|
||||||
Epoch: 2
|
Epoch: 2
|
||||||
Version: 8.2
|
Version: 8.2
|
||||||
Release: 20
|
Release: 21
|
||||||
Summary: Vim is a highly configurable text editor for efficiently creating and changing any kind of text.
|
Summary: Vim is a highly configurable text editor for efficiently creating and changing any kind of text.
|
||||||
License: Vim and MIT
|
License: Vim and MIT
|
||||||
URL: http://www.vim.org
|
URL: http://www.vim.org
|
||||||
@ -72,6 +72,7 @@ Patch6035: backport-CVE-2021-4193.patch
|
|||||||
Patch6036: backport-CVE-2022-0213.patch
|
Patch6036: backport-CVE-2022-0213.patch
|
||||||
Patch6037: backport-CVE-2022-0261.patch
|
Patch6037: backport-CVE-2022-0261.patch
|
||||||
Patch6038: backport-CVE-2022-0318.patch
|
Patch6038: backport-CVE-2022-0318.patch
|
||||||
|
Patch6039: backport-vim-fix-garbled-characters-display-when-file-name-ma.patch
|
||||||
|
|
||||||
Patch9000: bugfix-rm-modify-info-version.patch
|
Patch9000: bugfix-rm-modify-info-version.patch
|
||||||
|
|
||||||
@ -460,6 +461,12 @@ popd
|
|||||||
%{_mandir}/man1/evim.*
|
%{_mandir}/man1/evim.*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Jan 30 2022 yuanxin<yuanxin24@h-partners.com> - 2:8.2-21
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:fix garbled characters display when file name matches
|
||||||
|
|
||||||
* Sat Jan 29 2022 guozhaorui<guozhaorui1@h-partners.com> - 2:8.2-20
|
* Sat Jan 29 2022 guozhaorui<guozhaorui1@h-partners.com> - 2:8.2-20
|
||||||
- Type:CVE
|
- Type:CVE
|
||||||
- ID:CVE-2022-0213 CVE-2022-0261 CVE-2022-0318
|
- ID:CVE-2022-0213 CVE-2022-0261 CVE-2022-0318
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user