• R/O
  • SSH

vim: Commit

Mirror of the Vim source from https://github.com/vim/vim


Commit MetaInfo

Revision17ec36265fcbdd4652a0a256534b35c291e21aa7 (tree)
Time2019-11-09 06:00:04
AuthorBram Moolenaar <Bram@vim....>
CommiterBram Moolenaar

Log Message

patch 8.1.2270: "gf" is not tested in Visual mode

Commit: https://github.com/vim/vim/commit/0208b6b771161d1a668b3568f71dc2bde3614933
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Nov 8 21:49:48 2019 +0100

patch 8.1.2270: "gf" is not tested in Visual mode
Problem: "gf" is not tested in Visual mode.
Solution: Add Visual mode test and test errors. (Dominique Pelle,
closes #5197)

Change Summary

Incremental Difference

diff -r 3f04b0a32e7f -r 17ec36265fcb src/testdir/test_gf.vim
--- a/src/testdir/test_gf.vim Thu Nov 07 23:15:04 2019 +0100
+++ b/src/testdir/test_gf.vim Fri Nov 08 22:00:04 2019 +0100
@@ -99,3 +99,28 @@
9999 call delete('Xtest1')
100100 call delete('Xtestgf')
101101 endfunc
102+
103+func Test_gf_visual()
104+ call writefile([], "Xtest_gf_visual")
105+ new
106+ call setline(1, 'XXXtest_gf_visualXXX')
107+ set hidden
108+
109+ " Visually select Xtest_gf_visual and use gf to go to that file
110+ norm! ttvtXgf
111+ call assert_equal('Xtest_gf_visual', bufname('%'))
112+
113+ bwipe!
114+ call delete('Xtest_gf_visual')
115+ set hidden&
116+endfunc
117+
118+func Test_gf_error()
119+ new
120+ call assert_fails('normal gf', 'E446:')
121+ call assert_fails('normal gF', 'E446:')
122+ call setline(1, '/doesnotexist')
123+ call assert_fails('normal gf', 'E447:')
124+ call assert_fails('normal gF', 'E447:')
125+ bwipe!
126+endfunc
diff -r 3f04b0a32e7f -r 17ec36265fcb src/version.c
--- a/src/version.c Thu Nov 07 23:15:04 2019 +0100
+++ b/src/version.c Fri Nov 08 22:00:04 2019 +0100
@@ -742,6 +742,8 @@
742742 static int included_patches[] =
743743 { /* Add new patch number below this line */
744744 /**/
745+ 2270,
746+/**/
745747 2269,
746748 /**/
747749 2268,
Show on old repository browser