Mercurial > vim
annotate src/create_nvcmdidxs.c @ 32768:ad7365d54a0e v9.0.1702
patch 9.0.1702: Undo test is flaky
Commit: https://github.com/vim/vim/commit/9c30f4389944810cf88154d25dfd9ea5737c19e6
Author: zeertzjq <zeertzjq@outlook.com>
Date: Sun Aug 13 10:29:26 2023 +0200
patch 9.0.1702: Undo test is flaky
Problem: Undo test is flaky.
Solution: Apply filter and change time to "1 second ago" in both dumps.
closes: #12771
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 13 Aug 2023 10:45:05 +0200 |
parents | ee1019e59bef |
children |
rev | line source |
---|---|
27484
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
1 /* vi:set ts=8 sts=4 sw=4 noet: |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
2 * |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
3 * VIM - Vi IMproved by Bram Moolenaar et al. |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
4 * |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
5 * Do ":help uganda" in Vim to read copying and usage conditions. |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
6 * Do ":help credits" in Vim to see a list of people who contributed. |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
7 * See README.txt for an overview of the Vim source code. |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
8 */ |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
9 |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
10 /* |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
11 * create_nvcmdidxs.c: helper program for `make nvcmdidxs` |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
12 * |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
13 * This outputs the list of command characters from the nv_cmds table in |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
14 * decimal form, one per line. |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
15 */ |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
16 |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
17 #include "vim.h" |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
18 |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
19 // Declare nv_cmds[]. |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
20 #include "nv_cmds.h" |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
21 |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
22 #include <stdio.h> |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
23 |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
24 int main(void) |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
25 { |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
26 size_t i; |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
27 |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
28 for (i = 0; i < NV_CMDS_SIZE; i++) |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
29 { |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
30 int cmdchar = nv_cmds[i]; |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
31 |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
32 // Special keys are negative, use the negated value for sorting. |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
33 if (cmdchar < 0) |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
34 cmdchar = -cmdchar; |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
35 printf("%d\n", cmdchar); |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
36 } |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
37 return 0; |
ee1019e59bef
patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
38 } |