Mercurial > vim
view runtime/indent/vim.vim @ 34065:48955338edb1 v9.1.0002
patch 9.1.0002: a closing fold expr, may start a new fold
Commit: https://github.com/vim/vim/commit/0689b870595c687a23e102913ce5037f65d03748
Author: Shota Nozaki <emonkak@gmail.com>
Date: Wed Jan 3 19:18:43 2024 +0100
patch 9.1.0002: a closing fold expr, may start a new fold
Problem: a closing fold expression may unexpectedly start a new fold
when it should end a fold
(reported by Shota Nozaki)
Solution: if a fold hasn't started yet, do not immediately
start a new fold with level 1
(Shota Nozaki)
fixes: #12768
closes: #13748
Signed-off-by: Shota Nozaki <emonkak@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 03 Jan 2024 19:30:02 +0100 |
parents | 4027cefc2aab |
children | 5ac476543458 |
line wrap: on
line source
vim9script # Vim indent file # Language: Vim script # Maintainer: The Vim Project <https://github.com/vim/vim> # Last Change: 2023 Aug 10 # Former Maintainer: Bram Moolenaar <Bram@vim.org> # Only load this indent file when no other was loaded. if exists('b:did_indent') finish endif b:did_indent = true b:undo_indent = 'setlocal indentkeys< indentexpr<' import autoload '../autoload/dist/vimindent.vim' setlocal indentexpr=vimindent.Expr() setlocal indentkeys+==endif,=enddef,=endfu,=endfor,=endwh,=endtry,=endclass,=endinterface,=endenum,=},=else,=cat,=finall,=END,0\\ execute('setlocal indentkeys+=0=\"\\\ ,0=#\\\ ') setlocal indentkeys-=0# setlocal indentkeys-=: