To: vim_dev@googlegroups.com Subject: Patch 8.2.4857 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4857 Problem: Yaml indent for multiline is wrong. Solution: Adjust patterns. (closes #10328, closes #8740) Files: runtime/indent/yaml.vim, runtime/indent/testdir/yaml.in, runtime/indent/testdir/yaml.ok *** ../vim-8.2.4856/runtime/indent/yaml.vim 2019-09-28 16:39:45.000000000 +0100 --- runtime/indent/yaml.vim 2022-05-02 10:45:21.283837048 +0100 *************** *** 1,16 **** " Vim indent file ! " Language: YAML ! " Maintainer: Nikolai Pavlov ! " Last Change: 2019 Sep 28 " Only load this indent file when no other was loaded. if exists('b:did_indent') finish endif - let s:save_cpo = &cpo - set cpo&vim - let b:did_indent = 1 setlocal indentexpr=GetYAMLIndent(v:lnum) --- 1,14 ---- " Vim indent file ! " Language: YAML ! " Maintainer: Nikolai Pavlov ! " Last Update: Lukas Reineke ! " Last Change: 2022 May 02 " Only load this indent file when no other was loaded. if exists('b:did_indent') finish endif let b:did_indent = 1 setlocal indentexpr=GetYAMLIndent(v:lnum) *************** *** 24,29 **** --- 22,30 ---- finish endif + let s:save_cpo = &cpo + set cpo&vim + function s:FindPrevLessIndentedLine(lnum, ...) let prevlnum = prevnonblank(a:lnum-1) let curindent = a:0 ? a:1 : indent(a:lnum) *** ../vim-8.2.4856/runtime/indent/testdir/yaml.in 2019-09-28 16:45:49.000000000 +0100 --- runtime/indent/testdir/yaml.in 2022-05-02 10:42:10.884219697 +0100 *************** *** 12,14 **** --- 12,20 ---- map: &anchor map: val # END_INDENT + + # START_INDENT + map: | + line1 + line2 + # END_INDENT *** ../vim-8.2.4856/runtime/indent/testdir/yaml.ok 2019-09-28 16:45:46.000000000 +0100 --- runtime/indent/testdir/yaml.ok 2022-05-02 10:42:10.884219697 +0100 *************** *** 12,14 **** --- 12,20 ---- map: &anchor map: val # END_INDENT + + # START_INDENT + map: | + line1 + line2 + # END_INDENT *** ../vim-8.2.4856/src/version.c 2022-05-02 10:34:11.181183876 +0100 --- src/version.c 2022-05-02 10:44:38.799922411 +0100 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 4857, /**/ -- From "know your smileys": %-) After staring at the screen for 15 hours /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///