Mirror of the Vim source from https://github.com/vim/vim
Revision | 23f44007f65dc6b7fe35c5ffbca6c2410f949ce7 (tree) |
---|---|
Zeit | 2022-07-06 21:00:05 |
Autor | Bram Moolenaar <Bram@vim....> |
Commiter | Bram Moolenaar |
patch 9.0.0043: insufficient testing for bracket commands
Commit: https://github.com/vim/vim/commit/cf34434b5e840dda4a21cd9c0bee24e3e43a674d
Author: zeertzjq <zeertzjq@outlook.com>
Date: Wed Jul 6 12:57:31 2022 +0100
@@ -1994,9 +1994,16 @@ | ||
1994 | 1994 | call assert_equal(5, line('.')) |
1995 | 1995 | call assert_equal(3, col('.')) |
1996 | 1996 | |
1997 | - " No mark after line 21, cursor moves to first non blank on current line | |
1997 | + " No mark before line 1, cursor moves to first non-blank on current line | |
1998 | + 1 | |
1999 | + norm! 5|[' | |
2000 | + call assert_equal(' 1 b', getline('.')) | |
2001 | + call assert_equal(1, line('.')) | |
2002 | + call assert_equal(3, col('.')) | |
2003 | + | |
2004 | + " No mark after line 21, cursor moves to first non-blank on current line | |
1998 | 2005 | 21 |
1999 | - norm! $]' | |
2006 | + norm! 5|]' | |
2000 | 2007 | call assert_equal(' 21 b', getline('.')) |
2001 | 2008 | call assert_equal(21, line('.')) |
2002 | 2009 | call assert_equal(3, col('.')) |
@@ -2013,6 +2020,34 @@ | ||
2013 | 2020 | call assert_equal(20, line('.')) |
2014 | 2021 | call assert_equal(8, col('.')) |
2015 | 2022 | |
2023 | + " No mark before line 1, cursor does not move | |
2024 | + 1 | |
2025 | + norm! 5|[` | |
2026 | + call assert_equal(' 1 b', getline('.')) | |
2027 | + call assert_equal(1, line('.')) | |
2028 | + call assert_equal(5, col('.')) | |
2029 | + | |
2030 | + " No mark after line 21, cursor does not move | |
2031 | + 21 | |
2032 | + norm! 5|]` | |
2033 | + call assert_equal(' 21 b', getline('.')) | |
2034 | + call assert_equal(21, line('.')) | |
2035 | + call assert_equal(5, col('.')) | |
2036 | + | |
2037 | + " Count too large for [` | |
2038 | + " cursor moves to first lowercase mark | |
2039 | + norm! 99[` | |
2040 | + call assert_equal(' 1 b', getline('.')) | |
2041 | + call assert_equal(1, line('.')) | |
2042 | + call assert_equal(7, col('.')) | |
2043 | + | |
2044 | + " Count too large for ]` | |
2045 | + " cursor moves to last lowercase mark | |
2046 | + norm! 99]` | |
2047 | + call assert_equal(' 20 b', getline('.')) | |
2048 | + call assert_equal(20, line('.')) | |
2049 | + call assert_equal(8, col('.')) | |
2050 | + | |
2016 | 2051 | " clean up |
2017 | 2052 | bw! |
2018 | 2053 | endfunc |
@@ -736,6 +736,8 @@ | ||
736 | 736 | static int included_patches[] = |
737 | 737 | { /* Add new patch number below this line */ |
738 | 738 | /**/ |
739 | + 43, | |
740 | +/**/ | |
739 | 741 | 42, |
740 | 742 | /**/ |
741 | 743 | 41, |