Mercurial > vim
view runtime/autoload/modula2.vim @ 34153:c7779252fab5 v9.1.0037
patch 9.1.0037: Calling get_breakindent_win() repeatedly when computing virtcol
Commit: https://github.com/vim/vim/commit/5b0722b86445158f0b502ffc48a5847b0d0187bd
Author: zeertzjq <zeertzjq@outlook.com>
Date: Wed Jan 17 20:42:53 2024 +0100
patch 9.1.0037: Calling get_breakindent_win() repeatedly when computing virtcol
Problem: Calling get_breakindent_win() repeatedly when computing
virtual column, and get_breakindent_win() does a STRCMP() on
the whole line since patch 9.0.0016.
Solution: Cache the result, since the line doesn't change.
(zeertzjq)
closes: #13879
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 17 Jan 2024 20:45:03 +0100 |
parents | ff27442e7851 |
children |
line wrap: on
line source
" Vim filetype plugin file " Language: Modula-2 " Maintainer: Doug Kearns <dougkearns@gmail.com> " Last Change: 2024 Jan 04 " Dialect can be one of pim, iso, r10 function modula2#GetDialect() abort if exists("b:modula2.dialect") return b:modula2.dialect endif if exists("g:modula2_default_dialect") let dialect = g:modula2_default_dialect else let dialect = "pim" endif return dialect endfunction function modula2#SetDialect(dialect, extension = "") abort if exists("b:modula2") unlockvar! b:modula2 endif let b:modula2 = #{ dialect: a:dialect, extension: a:extension } lockvar! b:modula2 endfunction " vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker: