aboutsummaryrefslogtreecommitdiff
path: root/runtime/tools
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2024-11-19 22:57:13 +0000
committerJosh Rahm <joshuarahm@gmail.com>2024-11-19 22:57:13 +0000
commit9be89f131f87608f224f0ee06d199fcd09d32176 (patch)
tree11022dcfa9e08cb4ac5581b16734196128688d48 /runtime/tools
parentff7ed8f586589d620a806c3758fac4a47a8e7e15 (diff)
parent88085c2e80a7e3ac29aabb6b5420377eed99b8b6 (diff)
downloadrneovim-9be89f131f87608f224f0ee06d199fcd09d32176.tar.gz
rneovim-9be89f131f87608f224f0ee06d199fcd09d32176.tar.bz2
rneovim-9be89f131f87608f224f0ee06d199fcd09d32176.zip
Merge remote-tracking branch 'upstream/master' into mix_20240309
Diffstat (limited to 'runtime/tools')
-rw-r--r--runtime/tools/emoji_list.lua19
-rw-r--r--runtime/tools/emoji_list.vim21
2 files changed, 19 insertions, 21 deletions
diff --git a/runtime/tools/emoji_list.lua b/runtime/tools/emoji_list.lua
new file mode 100644
index 0000000000..63bbbe4371
--- /dev/null
+++ b/runtime/tools/emoji_list.lua
@@ -0,0 +1,19 @@
+-- Script to fill the window with emoji characters, one per line.
+-- Source this script: :source %
+
+if vim.bo.modified then
+ vim.cmd.new()
+else
+ vim.cmd.enew()
+end
+
+local lnum = 1
+for c = 0x100, 0x1ffff do
+ local cs = vim.fn.nr2char(c)
+ if vim.fn.charclass(cs) == 3 then
+ vim.fn.setline(lnum, string.format('|%s| %d', cs, vim.fn.strwidth(cs)))
+ lnum = lnum + 1
+ end
+end
+
+vim.bo.modified = false
diff --git a/runtime/tools/emoji_list.vim b/runtime/tools/emoji_list.vim
deleted file mode 100644
index c335b8c88f..0000000000
--- a/runtime/tools/emoji_list.vim
+++ /dev/null
@@ -1,21 +0,0 @@
-" Script to fill the window with emoji characters, one per line.
-" Source this script: :source %
-
-if &modified
- new
-else
- enew
-endif
-
-lua << EOF
- local lnum = 1
- for c = 0x100, 0x1ffff do
- local cs = vim.fn.nr2char(c)
- if vim.fn.charclass(cs) == 3 then
- vim.fn.setline(lnum, '|' .. cs .. '| ' .. vim.fn.strwidth(cs))
- lnum = lnum + 1
- end
- end
-EOF
-
-set nomodified