Mercurial > vim
view runtime/indent/chatito.vim @ 31932:19648eb383d9 v9.0.1298
patch 9.0.1298: inserting register on the cmdline does not trigger incsearch
Commit: https://github.com/vim/vim/commit/c4b7dec38292fe1cfad7aa5f244031fc6f7c7a09
Author: K.Takata <kentkt@csc.jp>
Date: Fri Feb 10 21:38:44 2023 +0000
patch 9.0.1298: inserting register on the cmdline does not trigger incsearch
Problem: Inserting a register on the command line does not trigger
incsearch or update hlsearch.
Solution: Have cmdline_insert_reg() return CMDLINE_CHANGED when appropriate
and handle it correctly. (Ken Takata, closes #11960)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 10 Feb 2023 22:45:03 +0100 |
parents | 1e91e26ceebf |
children |
line wrap: on
line source
" Vim indent file " Language: Chatito " Maintainer: ObserverOfTime <chronobserver@disroot.org> " Last Change: 2022 Sep 20 if exists('b:did_indent') finish endif let b:did_indent = 1 setlocal indentexpr=GetChatitoIndent() setlocal indentkeys=o,O,*<Return>,0#,!^F let b:undo_indent = 'setl inde< indk<' if exists('*GetChatitoIndent') finish endif function GetChatitoIndent() let l:prev = v:lnum - 1 if getline(prevnonblank(l:prev)) =~# '^[~%@]\[' " shift indent after definitions return shiftwidth() elseif getline(l:prev) !~# '^\s*$' " maintain indent in sentences return indent(l:prev) else " reset indent after a blank line return 0 end endfunction