Problem: 'ruler' is set in defaults.vim Commit: https://github.com/vim/vim/commit/ba36510920654a52d8b5908f5a61c6969bb31942 Author: Christian Brabandt <c...@256bit.org> Date: Mon Sep 15 18:40:57 2025 +0000
Problem: 'ruler' is set in defaults.vim Problem: 'ruler' is set in defaults.vim, but not enabled by default in non-compatible mode. Solution: set the ruler option in non-compatible mode, remove it from defaults.vim, update tests closes: #18260 Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/runtime/defaults.vim b/runtime/defaults.vim index d51eeee03..5c7100edc 100644 --- a/runtime/defaults.vim +++ b/runtime/defaults.vim @@ -1,7 +1,7 @@ " The default vimrc file. " " Maintainer: The Vim Project <https://github.com/vim/vim> -" Last Change: 2025 Jul 13 +" Last Change: 2025 Sep 10 " Former Maintainer: Bram Moolenaar <b...@vim.org> " " This is loaded if no vimrc file was found. @@ -33,8 +33,6 @@ silent! while 0 set nocompatible silent! endwhile -set ruler " show the cursor position all the time - set ttimeout " time out for key codes set ttimeoutlen=100 " wait up to 100ms after Esc for special key diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index b43f8c5d7..961f9c51a 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -2092,7 +2092,7 @@ A jump table for the options with a short description can be found at |Q_op|. 'preserveindent'+ off don't preserve current indent structure when changing it 'revins' + off no reverse insert - 'ruler' + off no ruler + 'ruler' & off no ruler 'scrolljump' + 1 no jump scroll 'scrolloff' + 0 no scroll offset 'shelltemp' - {unchanged} {set vim default only on resetting 'cp'} @@ -7134,7 +7134,7 @@ A jump table for the options with a short description can be found at |Q_op|. security reasons. *'ruler'* *'ru'* *'noruler'* *'noru'* -'ruler' 'ru' boolean (default off, set in |defaults.vim|) +'ruler' 'ru' boolean (Vim default: on, Vi default: off) global Show the line and column number of the cursor position, separated by a comma. When there is room, the relative position of the displayed diff --git a/runtime/doc/version9.txt b/runtime/doc/version9.txt index 0a1e38504..152229643 100644 --- a/runtime/doc/version9.txt +++ b/runtime/doc/version9.txt @@ -1,4 +1,4 @@ -*version9.txt* For Vim version 9.1. Last change: 2025 Sep 14 +*version9.txt* For Vim version 9.1. Last change: 2025 Sep 15 VIM REFERENCE MANUAL by Bram Moolenaar @@ -41672,6 +41672,8 @@ Default values: ~ |defaults.vim| - Improve the diff mode experience by updating the 'diffopt' default value to "internal,filler,closeoff,indent-heuristic,inline:char". +- the 'ruler' option value is always enabled when using non-compatible mode + and removed from |defaults.vim| Completion: ~ - allow to complete directories from 'cdpath' for |:cd| and similar commands, diff --git a/src/optiondefs.h b/src/optiondefs.h index ed3c35ccb..1db29305e 100644 --- a/src/optiondefs.h +++ b/src/optiondefs.h @@ -2228,9 +2228,9 @@ static struct vimoption options[] = {(char_u *)NULL, (char_u *)0L} #endif SCTX_INIT}, - {"ruler", "ru", P_BOOL|P_VI_DEF|P_VIM|P_RSTAT, + {"ruler", "ru", P_BOOL|P_VIM|P_RSTAT, (char_u *)&p_ru, PV_NONE, NULL, NULL, - {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {(char_u *)FALSE, (char_u *)TRUE} SCTX_INIT}, {"rulerformat", "ruf", P_STRING|P_VI_DEF|P_ALLOCED|P_RSTAT|P_MLE, #ifdef FEAT_STL_OPT (char_u *)&p_ruf, PV_NONE, did_set_rulerformat, NULL, diff --git a/src/testdir/dumps/Test_long_file_name_3.dump b/src/testdir/dumps/Test_long_file_name_3.dump new file mode 100644 index 000000000..dcd5d5b34 --- /dev/null +++ b/src/testdir/dumps/Test_long_file_name_3.dump @@ -0,0 +1,8 @@ +> +0&#ffffff0@74 +|~+0#4040ff13&| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|<+0#0000000&|x@46|"| |0|L|,| |0|B| |0|,|0|-|1| @8|A|l@1| diff --git a/src/testdir/dumps/Test_long_file_name_4.dump b/src/testdir/dumps/Test_long_file_name_4.dump new file mode 100644 index 000000000..8e13cb5a2 --- /dev/null +++ b/src/testdir/dumps/Test_long_file_name_4.dump @@ -0,0 +1,8 @@ +> +0&#ffffff0@74 +|~+0#4040ff13&| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|<+0#0000000&|x@36|"| |0|L|,| |0|B| @10|0|,|0|-|1| @8|A|l@1| diff --git a/src/testdir/dumps/Test_smooth_long_scrolloff_ru_1.dump b/src/testdir/dumps/Test_smooth_long_scrolloff_ru_1.dump new file mode 100644 index 000000000..b78abfa72 --- /dev/null +++ b/src/testdir/dumps/Test_smooth_long_scrolloff_ru_1.dump @@ -0,0 +1,8 @@ +|<+0#4040ff13#ffffff0@2|t+0#0000000&|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t +|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l +|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| +>t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| +|l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g +| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o +| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n +| @21|2|,|7|2|1| @8|2|0|%| diff --git a/src/testdir/dumps/Test_smooth_long_scrolloff_ru_2.dump b/src/testdir/dumps/Test_smooth_long_scrolloff_ru_2.dump new file mode 100644 index 000000000..906327d27 --- /dev/null +++ b/src/testdir/dumps/Test_smooth_long_scrolloff_ru_2.dump @@ -0,0 +1,8 @@ +|<+0#4040ff13#ffffff0@2|t+0#0000000&|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t +|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l +|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| +|t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| +>l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g +| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o +| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n +| @21|2|,|7|6|1| @8|2|0|%| diff --git a/src/testdir/dumps/Test_smooth_long_scrolloff_ru_3.dump b/src/testdir/dumps/Test_smooth_long_scrolloff_ru_3.dump new file mode 100644 index 000000000..021431d47 --- /dev/null +++ b/src/testdir/dumps/Test_smooth_long_scrolloff_ru_3.dump @@ -0,0 +1,8 @@ +|<+0#4040ff13#ffffff0@2|l+0#0000000&|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l +|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| +|t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| +|l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g +> |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o +| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n +|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| @20 +@22|2|,|8|0|1| @8|2|0|%| diff --git a/src/testdir/dumps/Test_smooth_long_scrolloff_ru_4.dump b/src/testdir/dumps/Test_smooth_long_scrolloff_ru_4.dump new file mode 100644 index 000000000..4e2f6b393 --- /dev/null +++ b/src/testdir/dumps/Test_smooth_long_scrolloff_ru_4.dump @@ -0,0 +1,8 @@ +|<+0#4040ff13#ffffff0@2|l+0#0000000&|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l +|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| +|t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| +|l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g +| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o +> |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n +|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| @20 +@22|2|,|8|4|1| @8|2|0|%| diff --git a/src/testdir/dumps/Test_smooth_long_scrolloff_ru_5.dump b/src/testdir/dumps/Test_smooth_long_scrolloff_ru_5.dump new file mode 100644 index 000000000..6e285023a --- /dev/null +++ b/src/testdir/dumps/Test_smooth_long_scrolloff_ru_5.dump @@ -0,0 +1,8 @@ +|<+0#4040ff13#ffffff0@2|l+0#0000000&|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l +|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| +|t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| +|l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g +| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o +| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n +>g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| @20 +@22|2|,|8@1|1| @8|2|0|%| diff --git a/src/testdir/dumps/Test_smooth_long_scrolloff_ru_6.dump b/src/testdir/dumps/Test_smooth_long_scrolloff_ru_6.dump new file mode 100644 index 000000000..456bff2ca --- /dev/null +++ b/src/testdir/dumps/Test_smooth_long_scrolloff_ru_6.dump @@ -0,0 +1,8 @@ +|<+0#4040ff13#ffffff0@2| +0#0000000&|l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| +|l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g +| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o +| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n +|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| @20 +>t|h|r|e@1| @34 +|f|o|u|r| @35 +@22|3|,|1| @10|3@1|%| diff --git a/src/testdir/dumps/Test_smooth_long_scrolloff_ru_7.dump b/src/testdir/dumps/Test_smooth_long_scrolloff_ru_7.dump new file mode 100644 index 000000000..6e285023a --- /dev/null +++ b/src/testdir/dumps/Test_smooth_long_scrolloff_ru_7.dump @@ -0,0 +1,8 @@ +|<+0#4040ff13#ffffff0@2|l+0#0000000&|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l +|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| +|t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| +|l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g +| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o +| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n +>g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| @20 +@22|2|,|8@1|1| @8|2|0|%| diff --git a/src/testdir/dumps/Test_smoothscroll_cursor_ru_top.dump b/src/testdir/dumps/Test_smoothscroll_cursor_ru_top.dump new file mode 100644 index 000000000..ec3816f6a --- /dev/null +++ b/src/testdir/dumps/Test_smoothscroll_cursor_ru_top.dump @@ -0,0 +1,12 @@ +| +0&#ffffff0@39 +|[+1&&|N|o| |N|a|m|e|]| @12|0|,|0|-|1| @9|A|l@1 +|l+0&&|i|n|e|1| @34 +|l|i|n|e|2| @34 +>l|i|n|e|3|l|i|n|e|3|l|i|n|e|3|l|i|n|e|3|l|i|n|e|3|l|i|n|e|3|l|i|n|e|3|l|i|n|e|3 +|l|i|n|e|3|l|i|n|e|3|l|i|n|e|3|l|i|n|e|3|l|i|n|e|3|l|i|n|e|3|l|i|n|e|3|l|i|n|e|3 +|l|i|n|e|3|l|i|n|e|3|l|i|n|e|3|l|i|n|e|3| @19 +|l|i|n|e|4| @34 +|~+0#4040ff13&| @38 +|~| @38 +|[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @8|3|,|1| @11|A|l@1 +| +0&&@39 diff --git a/src/testdir/dumps/Test_smoothscroll_in_qf_window_ru_1.dump b/src/testdir/dumps/Test_smoothscroll_in_qf_window_ru_1.dump new file mode 100644 index 000000000..097aec827 --- /dev/null +++ b/src/testdir/dumps/Test_smoothscroll_in_qf_window_ru_1.dump @@ -0,0 +1,20 @@ +> +0&#ffffff0@59 +|~+0#4040ff13&| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|[+3#0000000&|N|o| |N|a|m|e|]| @32|0|,|0|-|1| @9|A|l@1 +|<+0#4040ff13&@2| +0#af5f00255&|2+0#0000000&|1| |2@1| |2|3| |2|4| |2|5| |2|6| |2|7| |2|8| |2|9| @29 +| +0#af5f00255&|1|0| ||+0#0000000&@1| |0| |1| |2| |3| |4| |5| |6| |7| |8| |9| |1|0| |1@1| |1|2| |1|3| |1|4| |1|5| |1|6| |1|7| |1|8| |1|9| |2|0| +| +0#af5f00255&@3|2+0#0000000&|1| |2@1| |2|3| |2|4| |2|5| |2|6| |2|7| |2|8| |2|9| @29 +| +0#af5f00255&|1@1| ||+0#0000000&@1| |0| |1| |2| |3| |4| |5| |6| |7| |8| |9| |1|0| |1@1| |1|2| |1|3| |1|4| |1|5| |1|6| |1|7| |1|8| |1|9| |2|0| +| +0#af5f00255&@3|2+0#0000000&|1| |2@1| |2|3| |2|4| |2|5| |2|6| |2|7| |2|8| |2|9| @29 +|[+1&&|Q|u|i|c|k|f|i|x| |L|i|s|t|]| @26|1@1|,|1| @10|B|o|t +| +0&&@59 diff --git a/src/testdir/dumps/Test_smoothscroll_in_qf_window_ru_2.dump b/src/testdir/dumps/Test_smoothscroll_in_qf_window_ru_2.dump new file mode 100644 index 000000000..0f64bb8a9 --- /dev/null +++ b/src/testdir/dumps/Test_smoothscroll_in_qf_window_ru_2.dump @@ -0,0 +1,20 @@ +> +0&#ffffff0@59 +|~+0#4040ff13&| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|[+3#0000000&|N|o| |N|a|m|e|]| @32|0|,|0|-|1| @9|A|l@1 +| +0#af5f00255&@1|1| | +0#0000000&@55 +|~+0#4040ff13&| @58 +|~| @58 +|~| @58 +|~| @58 +|[+1#0000000&|Q|u|i|c|k|f|i|x| |L|i|s|t|]| @26|0|,|0|-|1| @9|A|l@1 +|:+0&&|c|a|l@1| |s|e|t|q|f|l|i|s|t|(|[|]|,| |'|r|'|)| @35 diff --git a/src/testdir/dumps/Test_smoothscroll_in_qf_window_ru_3.dump b/src/testdir/dumps/Test_smoothscroll_in_qf_window_ru_3.dump new file mode 100644 index 000000000..1fadb4096 --- /dev/null +++ b/src/testdir/dumps/Test_smoothscroll_in_qf_window_ru_3.dump @@ -0,0 +1,20 @@ +> +0&#ffffff0@59 +|~+0#4040ff13&| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|[+3#0000000&|N|o| |N|a|m|e|]| @32|0|,|0|-|1| @9|A|l@1 +| +0#af5f00255&@1|1| ||+0#0000000#ffff4012@1| |f|o@1| @49 +| +0#af5f00255#ffffff0@1|2| ||+0#0000000&@1| |0| |1| |2| |3| |4| |5| |6| |7| |8| |9| |1|0| |1@1| |1|2| |1|3| |1|4| |1|5| |1|6| |1|7| |1|8| |1|9| |2|0| +| +0#af5f00255&@3|2+0#0000000&|1| |2@1| |2|3| |2|4| |2|5| |2|6| |2|7| |2|8| |2|9| @29 +| +0#af5f00255&@1|3| ||+0#0000000&@1| |0| |1| |2| |3| |4| |5| |6| |7| |8| |9| |1|0| |1@1| |1|2| |1|3| |1|4| |1|5| |1|6| |1|7| |1|8| |1|9| |2|0| +| +0#af5f00255&@3|2+0#0000000&|1| |2@1| |2|3| |2|4| |2|5| |2|6| |2|7| |2|8| |2|9| @29 +|[+1&&|Q|u|i|c|k|f|i|x| |L|i|s|t|]| @26|1|,|1| @11|T|o|p +|:+0&&|c|a|l@1| |s|e|t|q|f|l|i|s|t|(|g|:|l|,| |'|r|'|)| @34 diff --git a/src/testdir/dumps/Test_smoothscroll_in_qf_window_ru_4.dump b/src/testdir/dumps/Test_smoothscroll_in_qf_window_ru_4.dump new file mode 100644 index 000000000..c31640bee --- /dev/null +++ b/src/testdir/dumps/Test_smoothscroll_in_qf_window_ru_4.dump @@ -0,0 +1,20 @@ +> +0&#ffffff0@59 +|~+0#4040ff13&| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|[+3#0000000&|N|o| |N|a|m|e|]| @32|0|,|0|-|1| @9|A|l@1 +| +0#af5f00255&@1|1| ||+0#0000000#ffff4012@1| |0| |1| |2| |3| |4| |5| |6| |7| |8| |9| |1|0| |1@1| |1|2| |1|3| |1|4| |1|5| |1|6| |1|7| |1|8| |1|9| |2|0| +| +0#af5f00255#ffffff0@3|2+0#0000000#ffff4012|1| |2@1| |2|3| |2|4| |2|5| |2|6| |2|7| |2|8| |2|9| |3|0| |3|1| |3|2| |3@1| |3|4| |3|5| |3|6| |3|7| |3|8| |3|9 +| +0#af5f00255#ffffff0@3| +0#0000000#ffff4012|4|0| |4|1| |4|2| |4|3| |4@1| |4|5| |4|6| |4|7| |4|8| |4|9| |5|0| |5|1| |5|2| |5|3| |5|4| |5@1| |5|6| |5|7| |5 +| +0#af5f00255#ffffff0@3|8+0#0000000#ffff4012| |5|9| |6|0| |6|1| |6|2| |6|3| |6|4| |6|5| |6@1| |6|7| |6|8| |6|9| |7|0| |7|1| |7|2| |7|3| |7|4| |7|5| |7|6| +| +0#af5f00255#ffffff0@3|7+0#0000000#ffff4012@1| |7|8| |7|9| |8|0| |8|1| |8|2| |8|3| |8|4| |8|5| |8|6| |8|7| |8@1| |8|9| |9|0| |9|1| |9|2| |9|3| |9|4| |9|5 +|[+1&#ffffff0|Q|u|i|c|k|f|i|x| |L|i|s|t|]| @26|1|,|1| @11|A|l@1 +|:+0&&|c|a|l@1| |s|e|t|q|f|l|i|s|t|(|g|:|l|1|,| |'|r|'|)| @33 diff --git a/src/testdir/dumps/Test_smoothscroll_in_qf_window_ru_5.dump b/src/testdir/dumps/Test_smoothscroll_in_qf_window_ru_5.dump new file mode 100644 index 000000000..3b3338fbf --- /dev/null +++ b/src/testdir/dumps/Test_smoothscroll_in_qf_window_ru_5.dump @@ -0,0 +1,20 @@ +> +0&#ffffff0@59 +|~+0#4040ff13&| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|[+3#0000000&|N|o| |N|a|m|e|]| @32|0|,|0|-|1| @9|A|l@1 +|<+0#4040ff13&@2| +0#af5f00255&| +0#0000000#ffff4012|9|3|7| |9|3|8| |9|3|9| |9|4|0| |9|4|1| |9|4|2| |9|4|3| |9|4@1| |9|4|5| |9|4|6| |9|4|7| |9|4|8| |9|4|9| |9|5|0 +| +0#af5f00255#ffffff0@3| +0#0000000#ffff4012|9|5|1| |9|5|2| |9|5|3| |9|5|4| |9|5@1| |9|5|6| |9|5|7| |9|5|8| |9|5|9| |9|6|0| |9|6|1| |9|6|2| |9|6|3| |9|6|4 +| +0#af5f00255#ffffff0@3| +0#0000000#ffff4012|9|6|5| |9|6@1| |9|6|7| |9|6|8| |9|6|9| |9|7|0| |9|7|1| |9|7|2| |9|7|3| |9|7|4| |9|7|5| |9|7|6| |9|7@1| |9|7|8 +| +0#af5f00255#ffffff0@3| +0#0000000#ffff4012|9|7|9| |9|8|0| |9|8|1| |9|8|2| |9|8|3| |9|8|4| |9|8|5| |9|8|6| |9|8|7| |9|8@1| |9|8|9| |9@1|0| |9@1|1| |9@1|2 +| +0#af5f00255#ffffff0@3| +0#0000000#ffff4012|9@1|3| |9@1|4| |9@1|5| |9@1|6| |9@1|7| |9@1|8| |9@2| @27 +|[+1&#ffffff0|Q|u|i|c|k|f|i|x| |L|i|s|t|]| @26|1|,|3|8|9|2| @8|A|l@1 +|:+0&&|c|a|l@1| |s|e|t|q|f|l|i|s|t|(|g|:|l|1|,| |'|r|'|)| @33 diff --git a/src/testdir/dumps/Test_smoothscroll_insert_bottom_ruler.dump b/src/testdir/dumps/Test_smoothscroll_insert_bottom_ruler.dump new file mode 100644 index 000000000..9c66cb467 --- /dev/null +++ b/src/testdir/dumps/Test_smoothscroll_insert_bottom_ruler.dump @@ -0,0 +1,9 @@ +|<+0#4040ff13#ffffff0@2|e+0#0000000&|r|y| |l|o|n|g| |l|i|n|e| |.@2|A| |v|e|r|y| |l|o|n|g| |l|i|n|e| |.@2 +|A| |v|e|r|y| |l|o|n|g| |l|i|n|e| |.@2|A| |v|e|r|y| |l|o|n|g| |l|i|n|e| |.@2 +|A| |v|e|r|y| |l|o|n|g| |l|i|n|e| |.@2|A| |v|e|r|y| |l|o|n|g| |l|i|n|e| |.@2 +|A| |v|e|r|y| |l|o|n|g| |l|i|n|e| |.@2|A| |v|e|r|y| |l|o|n|g| |l|i|n|e| |.@2 +|A| |v|e|r|y| |l|o|n|g| |l|i|n|e| |.@2|A| |v|e|r|y| |l|o|n|g| |l|i|n|e| |.@2 +|A| |v|e|r|y| |l|o|n|g| |l|i|n|e| |.@2|A| |v|e|r|y| |l|o|n|g| |l|i|n|e| |.@2 +|1|2|3|4|5|6|7|8|9| @30 +> @39 +@22|7|,|1| @10|B|o|t| diff --git a/src/testdir/dumps/Test_smoothscroll_zero_bot_ruler.dump b/src/testdir/dumps/Test_smoothscroll_zero_bot_ruler.dump new file mode 100644 index 000000000..027f54f59 --- /dev/null +++ b/src/testdir/dumps/Test_smoothscroll_zero_bot_ruler.dump @@ -0,0 +1,19 @@ +| +0#af5f00255#ffffff0||+1#0000000&| +0&&@72 +|@+0#4040ff13&||+1#0000000&| +0&&@72 +|@+0#4040ff13&||+1#0000000&| +0&&@72 +|@+0#4040ff13&||+1#0000000&| +0&&@72 +|@+0#4040ff13&||+1#0000000&| +0&&@72 +|@+0#4040ff13&||+1#0000000&| +0&&@72 +|@+0#4040ff13&||+1#0000000&| +0&&@72 +|@+0#4040ff13&||+1#0000000&| +0&&@72 +|@+0#4040ff13&||+1#0000000&| +0&&@72 +|@+0#4040ff13&||+1#0000000&| +0&&@72 +|@+0#4040ff13&||+1#0000000&| +0&&@72 +|@+0#4040ff13&||+1#0000000&| +0&&@72 +|@+0#4040ff13&||+1#0000000&| +0&&@72 +|@+0#4040ff13&||+1#0000000&| +0&&@72 +|@+0#4040ff13&||+1#0000000&| +0&&@72 +|@+0#4040ff13&||+1#0000000&| +0&&@72 +>@+0#4040ff13&||+1#0000000&| +0&&@72 +|<+3&&| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @41|2|,|0|-|1| @9|T|o|p +| +0&&@74 diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim index 2c976e82d..cbcdd4036 100644 --- a/src/testdir/test_autocmd.vim +++ b/src/testdir/test_autocmd.vim @@ -2462,7 +2462,10 @@ func Test_BufReadCmd() call writefile(['one', 'two', 'three'], 'Xcmd.test', 'D') edit Xcmd.test + set noruler call assert_match('Xcmd.test" line 1 of 3', execute('file')) + set ruler + call assert_match('Xcmd.test" 3 lines --33%--', execute('file')) normal! Gofour write call assert_equal(['one', 'two', 'three', 'four'], readfile('Xcmd.test')) diff --git a/src/testdir/test_display.vim b/src/testdir/test_display.vim index 61a7e3cf7..ed8495984 100644 --- a/src/testdir/test_display.vim +++ b/src/testdir/test_display.vim @@ -184,13 +184,30 @@ func Test_edit_long_file_name() let longName = 'x'->repeat(min([&columns, 255])) call writefile([], longName, 'D') - let buf = RunVimInTerminal('-N -u NONE --cmd ":set noshowcmd" ' .. longName, #{rows: 8}) + let buf = RunVimInTerminal('-N -u NONE --cmd ":set noshowcmd noruler" ' .. longName, #{rows: 8}) call VerifyScreenDump(buf, 'Test_long_file_name_1', {}) call term_sendkeys(buf, ":set showcmd\<cr>:e!\<cr>") call VerifyScreenDump(buf, 'Test_long_file_name_2', {}) + " clean up + call StopVimInTerminal(buf) + set ruler&vim +endfunc + +func Test_edit_long_file_name_with_ruler() + CheckScreendump + + let longName = 'x'->repeat(min([&columns, 255])) + call writefile([], longName, 'D') + let buf = RunVimInTerminal('-N -u NONE --cmd ":set noshowcmd" ' .. longName, #{rows: 8}) + + call VerifyScreenDump(buf, 'Test_long_file_name_3', {}) + + call term_sendkeys(buf, ":set showcmd\<cr>:e!\<cr>") + call VerifyScreenDump(buf, 'Test_long_file_name_4', {}) + " clean up call StopVimInTerminal(buf) endfunc diff --git a/src/testdir/test_registers.vim b/src/testdir/test_registers.vim index b30b854e0..f1a241313 100644 --- a/src/testdir/test_registers.vim +++ b/src/testdir/test_registers.vim @@ -165,6 +165,7 @@ func Test_register_one() endfunc func Test_recording_status_in_ex_line() + set noruler norm qx redraw! call assert_equal('recording @x', Screenline(&lines)) @@ -175,6 +176,17 @@ func Test_recording_status_in_ex_line() norm q redraw! call assert_equal('', Screenline(&lines)) + set ruler + norm qx + redraw! + call assert_match('recording @x\s*0,0-1\s*All', Screenline(&lines)) + set shortmess=q + redraw! + call assert_match('recording\s*0,0-1\s*All', Screenline(&lines)) + set shortmess& + norm q + redraw! + call assert_match('\s*0,0-1\s*All', Screenline(&lines)) endfunc " Check that replaying a typed sequence does not use an Esc and following diff --git a/src/testdir/test_scroll_opt.vim b/src/testdir/test_scroll_opt.vim index 81415e1c6..27f269a37 100644 --- a/src/testdir/test_scroll_opt.vim +++ b/src/testdir/test_scroll_opt.vim @@ -950,10 +950,11 @@ func Test_smoothscroll_multi_skipcol() endfunc " this was dividing by zero bug in scroll_cursor_bot -func Test_smoothscroll_zero_width_scroll_cursor_bot() +func Test_smoothscroll_zero_width_scroll_cursor_bot_noruler() CheckScreendump let lines =<< trim END + set noruler silent normal yy silent normal 19p set cpoptions+=n @@ -971,12 +972,34 @@ func Test_smoothscroll_zero_width_scroll_cursor_bot() call StopVimInTerminal(buf) endfunc +func Test_smoothscroll_zero_width_scroll_cursor_bot_ruler() + CheckScreendump + + let lines =<< trim END + set ruler + silent normal yy + silent normal 19p + set cpoptions+=n + vsplit + vertical resize 0 + set foldcolumn=1 + set number + set smoothscroll + silent normal 20G + END + call writefile(lines, 'XSmoothScrollZeroBot', 'D') + let buf = RunVimInTerminal('-u NONE -S XSmoothScrollZeroBot', #{rows: 19}) + call VerifyScreenDump(buf, 'Test_smoothscroll_zero_bot_ruler', {}) + + call StopVimInTerminal(buf) +endfunc + " scroll_cursor_top() should reset skipcol when it changes topline -func Test_smoothscroll_cursor_top() +func Test_smoothscroll_cursor_top_noruler() CheckScreendump let lines =<< trim END - set smoothscroll scrolloff=2 + set smoothscroll scrolloff=2 noruler new | 11resize | wincmd j call setline(1, ['line1', 'line2', 'line3'->repeat(20), 'line4']) exe "norm G3\<C-E>k" @@ -988,6 +1011,22 @@ func Test_smoothscroll_cursor_top() call StopVimInTerminal(buf) endfunc +func Test_smoothscroll_cursor_top_ruler() + CheckScreendump + + let lines =<< trim END + set smoothscroll scrolloff=2 ruler + new | 11resize | wincmd j + call setline(1, ['line1', 'line2', 'line3'->repeat(20), 'line4']) + exe "norm G3\<C-E>k" + END + call writefile(lines, 'XSmoothScrollCursorTop', 'D') + let buf = RunVimInTerminal('-u NONE -S XSmoothScrollCursorTop', #{rows: 12, cols: 40}) + call VerifyScreenDump(buf, 'Test_smoothscroll_cursor_ru_top', {}) + + call StopVimInTerminal(buf) +endfunc + " Division by zero, shouldn't crash func Test_smoothscroll_crash() CheckScreendump @@ -1007,12 +1046,12 @@ func Test_smoothscroll_crash() call StopVimInTerminal(buf) endfunc -func Test_smoothscroll_insert_bottom() +func Test_smoothscroll_insert_bottom_noruler() CheckScreendump let lines =<< trim END call setline(1, repeat([repeat('A very long line ...', 10)], 5)) - set wrap smoothscroll scrolloff=0 + set wrap smoothscroll scrolloff=0 noruler END call writefile(lines, 'XSmoothScrollInsertBottom', 'D') let buf = RunVimInTerminal('-u NONE -S XSmoothScrollInsertBottom', #{rows: 9, cols: 40}) @@ -1022,12 +1061,27 @@ func Test_smoothscroll_insert_bottom() call StopVimInTerminal(buf) endfunc -func Test_smoothscroll_in_qf_window() +func Test_smoothscroll_insert_bottom_ruler() + CheckScreendump + + let lines =<< trim END + call setline(1, repeat([repeat('A very long line ...', 10)], 5)) + set wrap smoothscroll scrolloff=0 ruler + END + call writefile(lines, 'XSmoothScrollInsertBottom', 'D') + let buf = RunVimInTerminal('-u NONE -S XSmoothScrollInsertBottom', #{rows: 9, cols: 40}) + call term_sendkeys(buf, "Go123456789\<CR>") + call VerifyScreenDump(buf, 'Test_smoothscroll_insert_bottom_ruler', {}) + + call StopVimInTerminal(buf) +endfunc + +func Test_smoothscroll_in_qf_window_noruler() CheckFeature quickfix CheckScreendump let lines =<< trim END - set nocompatible display=lastline + set nocompatible display=lastline noruler copen 5 setlocal number smoothscroll let g:l = [{'text': 'foo'}] + repeat([{'text': join(range(30))}], 10) @@ -1067,6 +1121,51 @@ func Test_smoothscroll_in_qf_window() call StopVimInTerminal(buf) endfunc +func Test_smoothscroll_in_qf_window_ruler() + CheckFeature quickfix + CheckScreendump + + let lines =<< trim END + set nocompatible display=lastline ruler + copen 5 + setlocal number smoothscroll + let g:l = [{'text': 'foo'}] + repeat([{'text': join(range(30))}], 10) + call setqflist(g:l, 'r') + normal! G + wincmd t + let g:l1 = [{'text': join(range(1000))}] + END + call writefile(lines, 'XSmoothScrollInQfWindow', 'D') + let buf = RunVimInTerminal('-u NONE -S XSmoothScrollInQfWindow', #{rows: 20, cols: 60}) + call VerifyScreenDump(buf, 'Test_smoothscroll_in_qf_window_ru_1', {}) + + call term_sendkeys(buf, ":call setqflist([], 'r')\<CR>") + call VerifyScreenDump(buf, 'Test_smoothscroll_in_qf_window_ru_2', {}) + + call term_sendkeys(buf, ":call setqflist(g:l, 'r')\<CR>") + call VerifyScreenDump(buf, 'Test_smoothscroll_in_qf_window_ru_3', {}) + + call term_sendkeys(buf, ":call setqflist(g:l1, 'r')\<CR>") + call VerifyScreenDump(buf, 'Test_smoothscroll_in_qf_window_ru_4', {}) + + call term_sendkeys(buf, "\<C-W>b$\<C-W>t") + call VerifyScreenDump(buf, 'Test_smoothscroll_in_qf_window_ru_5', {}) + + call term_sendkeys(buf, ":call setqflist([], 'r')\<CR>") + call VerifyScreenDump(buf, 'Test_smoothscroll_in_qf_window_ru_2', {}) + + call term_sendkeys(buf, ":call setqflist(g:l1, 'r')\<CR>") + call VerifyScreenDump(buf, 'Test_smoothscroll_in_qf_window_ru_4', {}) + + call term_sendkeys(buf, "\<C-W>b$\<C-W>t") + call VerifyScreenDump(buf, 'Test_smoothscroll_in_qf_window_ru_5', {}) + + call term_sendkeys(buf, ":call setqflist(g:l, 'r')\<CR>") + call VerifyScreenDump(buf, 'Test_smoothscroll_in_qf_window_ru_3', {}) + + call StopVimInTerminal(buf) +endfunc + func Test_smoothscroll_in_zero_width_window() set cpo+=n number smoothscroll set winwidth=99999 winminwidth=0 @@ -1214,11 +1313,12 @@ func Test_smoothscroll_long_line_zb() bwipe! endfunc -func Test_smooth_long_scrolloff() +func Test_smooth_long_scrolloff_noruler() CheckScreendump let lines =<< trim END set smoothscroll scrolloff=3 + set noruler call setline(1, ['one', 'two long '->repeat(100), 'three', 'four', 'five', 'six']) END call writefile(lines, 'XSmoothLongScrolloff', 'D') @@ -1247,6 +1347,39 @@ func Test_smooth_long_scrolloff() call StopVimInTerminal(buf) endfunc +func Test_smooth_long_scrolloff_ruler() + CheckScreendump + + let lines =<< trim END + set smoothscroll scrolloff=3 ruler + call setline(1, ['one', 'two long '->repeat(100), 'three', 'four', 'five', 'six']) + END + call writefile(lines, 'XSmoothLongScrolloff', 'D') + let buf = RunVimInTerminal('-u NONE -S XSmoothLongScrolloff', #{rows: 8, cols: 40}) + call term_sendkeys(buf, ":norm j721|\<CR>") + call VerifyScreenDump(buf, 'Test_smooth_long_scrolloff_ru_1', {}) + + call term_sendkeys(buf, "gj") + call VerifyScreenDump(buf, 'Test_smooth_long_scrolloff_ru_2', {}) + + call term_sendkeys(buf, "gj") + call VerifyScreenDump(buf, 'Test_smooth_long_scrolloff_ru_3', {}) + + call term_sendkeys(buf, "gj") + call VerifyScreenDump(buf, 'Test_smooth_long_scrolloff_ru_4', {}) + + call term_sendkeys(buf, "gj") + call VerifyScreenDump(buf, 'Test_smooth_long_scrolloff_ru_5', {}) + + call term_sendkeys(buf, "gj") + call VerifyScreenDump(buf, 'Test_smooth_long_scrolloff_ru_6', {}) + + call term_sendkeys(buf, "gk") + call VerifyScreenDump(buf, 'Test_smooth_long_scrolloff_ru_7', {}) + + call StopVimInTerminal(buf) +endfunc + func Test_smoothscroll_listchars_eol() call NewWindow(10, 40) setlocal list listchars=eol:$ scrolloff=0 smoothscroll diff --git a/src/version.c b/src/version.c index f3b531eb4..96a41c2d7 100644 --- a/src/version.c +++ b/src/version.c @@ -724,6 +724,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1761, /**/ 1760, /**/ -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/vim_dev/E1uyECJ-008Zrm-2X%40256bit.org.