Mercurial > vim
comparison runtime/tools/emoji_list.vim @ 21981:48e914e637c5 v8.2.1540
patch 8.2.1540: the user cannot try out emoji character widths
Commit: https://github.com/vim/vim/commit/98945560c1ae6e2ddee820a7de718a36e3f4b6e5
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 29 16:41:27 2020 +0200
patch 8.2.1540: the user cannot try out emoji character widths
Problem: The user cannot try out emoji character widths.
Solution: Move the emoji script to the runtime/tools directory.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 29 Aug 2020 16:45:03 +0200 |
parents | src/testdir/emoji_list.vim@85add08e6a2d |
children | 99ef85ff1af4 |
comparison
equal
deleted
inserted
replaced
21980:7776b9dc3b29 | 21981:48e914e637c5 |
---|---|
1 " Script to fill the window with emoji characters, one per line. | |
2 " Source this script: :source % | |
3 | |
4 if &modified | |
5 new | |
6 else | |
7 enew | |
8 endif | |
9 | |
10 " Use a compiled Vim9 function for speed | |
11 def DoIt() | |
12 let lnum = 1 | |
13 for c in range(0x100, 0x1ffff) | |
14 let cs = nr2char(c) | |
15 if charclass(cs) == 3 | |
16 setline(lnum, '|' .. cs .. '| ' .. strwidth(cs)) | |
17 lnum += 1 | |
18 endif | |
19 endfor | |
20 enddef | |
21 | |
22 call DoIt() | |
23 set nomodified |