• R/O
  • SSH

vim: Commit

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


Commit MetaInfo

Révisiond2471d710ec9b98be0a9691fbdf1c871e0e13d93 (tree)
l'heure2022-01-16 03:45:03
AuteurBram Moolenaar <Bram@vim....>
CommiterBram Moolenaar

Message de Log

patch 8.2.4100: early return when getting the 'formatlistpat' value

Commit: https://github.com/vim/vim/commit/04b871da800768287a8a432de568b11297db8686
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 15 18:31:43 2022 +0000

patch 8.2.4100: early return when getting the 'formatlistpat' value
Problem: Early return when getting the 'formatlistpat' value.
Solution: Remove the first line. (Christian Brabandt)

Change Summary

Modification

diff -r 5d0ddfc61e67 -r d2471d710ec9 src/option.c
--- a/src/option.c Sat Jan 15 19:30:05 2022 +0100
+++ b/src/option.c Sat Jan 15 19:45:03 2022 +0100
@@ -7058,7 +7058,6 @@
70587058 char_u *
70597059 get_flp_value(buf_T *buf)
70607060 {
7061- return buf->b_p_flp ? buf->b_p_flp : p_flp;
70627061 if (buf->b_p_flp == NULL || *buf->b_p_flp == NUL)
70637062 return p_flp;
70647063 return buf->b_p_flp;
diff -r 5d0ddfc61e67 -r d2471d710ec9 src/testdir/test_breakindent.vim
--- a/src/testdir/test_breakindent.vim Sat Jan 15 19:30:05 2022 +0100
+++ b/src/testdir/test_breakindent.vim Sat Jan 15 19:45:03 2022 +0100
@@ -890,7 +890,22 @@
890890 \ "~ ",
891891 \ ]
892892 let lines = s:screen_lines2(1, 4, 20)
893- " 3) add something in front, no additional indent
893+ " 3) no local formatlist pattern,
894+ " so use global one -> indent
895+ let g_flp = &g:flp
896+ let &g:formatlistpat='^\s*\d\+\.\s\+'
897+ let &l:formatlistpat=''
898+ let expect = [
899+ \ " 1. word word word ",
900+ \ " word word word ",
901+ \ " word word ",
902+ \ "~ ",
903+ \ ]
904+ let lines = s:screen_lines2(1, 4, 20)
905+ call s:compare_lines(expect, lines)
906+ let &g:flp = g_flp
907+ let &l:formatlistpat='^\s*\d\+\.'
908+ " 4) add something in front, no additional indent
894909 norm! gg0
895910 exe ":norm! 5iword \<esc>"
896911 redraw!
diff -r 5d0ddfc61e67 -r d2471d710ec9 src/version.c
--- a/src/version.c Sat Jan 15 19:30:05 2022 +0100
+++ b/src/version.c Sat Jan 15 19:45:03 2022 +0100
@@ -751,6 +751,8 @@
751751 static int included_patches[] =
752752 { /* Add new patch number below this line */
753753 /**/
754+ 4100,
755+/**/
754756 4099,
755757 /**/
756758 4098,
Afficher sur ancien navigateur de dépôt.