Mercurial > vim
view src/testdir/bench_re_freeze.vim @ 12648:cdfd6eb8bb80 v8.0.1202
patch 8.0.1202: :wall gives an errof for a terminal window
commit https://github.com/vim/vim/commit/059db5c29ffef283a4b90bab9228708fa32e3dd2
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Oct 15 22:42:23 2017 +0200
patch 8.0.1202: :wall gives an errof for a terminal window
Problem: :wall gives an errof for a terminal window. (Marius Gedminas)
Solution: Don't try writing a buffer that can't be written. (Yasuhiro
Matsumoto, closes #2190)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 15 Oct 2017 22:45:05 +0200 |
parents | adfbffe1e642 |
children |
line wrap: on
line source
"Test for benchmarking the RE engine so small.vim if !has("reltime") | finish | endif func! Measure(file, pattern, arg) for re in range(3) let sstart=reltime() let cmd=printf("../vim -u NONE -N --cmd ':set re=%d'". \ " -c 'call search(\"%s\", \"\", \"\", 10000)' -c ':q!' %s", re, escape(a:pattern, '\\'), empty(a:arg) ? '' : a:arg) call system(cmd. ' '. a:file) $put =printf('file: %s, re: %d, time: %s', a:file, re, reltimestr(reltime(sstart))) endfor endfunc