kakoune/test/regression
Johannes Altmanninger 42be0057a6 map: fail if key is currently executing
If during execution of a mapping, that same mapping is replaced,
there is undefined behavior because we destroy a mapping that we are
still iterating over.

I have been using this mapping inside my kakrc to re-source the kakrc.

	map global user s %{:source "%val{config}/kakrc"<ret>} -docstring 'source "%val{config}/kakrc"'

Now <space>s happens to not trigger undefined behavior because the
mapping stays the same.

However it triggers an assertion added by Commit e49c0fb04 (unmap:
fail if the mapping is currently executing, 2023-05-14), specifically
the destructor of ScopedSetBool that guards mapping execution.

Fix these by banning map of a key that is executing, just like we
did for unmap.

Alternative solution: we could allow mapping (and even unmapping)
keys at any time and keep them alive by moving them into a trash can,
like we do for clients and others.
2023-07-03 19:03:11 +02:00
..
595-smart-search-unicode
612-assertion-with-NormalBegin-hook
633-spurious-new-line-inserted-when-replacing-at-end
638-highlight-codepoint-with-bracket
643-crash-on-a-@-on-specially-crafted-buffer
654-crash-on-undo-after-macro
699-to-eol-from-eol
704-crash-when-using-a-hook-on-NormalBegin-and-NormalEnd
733-selection-list-from-string-not-valid
743-crash-on-replace-undo
751-wrong-selection-after-undo
787-crash-after-S
809-alt-f-t-to-first-char
811-double-width-codepoints
844-prev-word-at-buffer-start
860-python-incorrect-commenting
872-indentation-misbeahviour-c++
918-wrong-asterisk-inserted Add categories in rc/ 2019-03-21 01:06:16 +01:00
921-keep-empty-line-matches-all-lines
993-user-text-object
1014-ambiguous-kak_selections
1051-crash-on-empty-param
1053-crash-on-deletion-and-paste
1074-comment-leader-autoinsert-error Add categories in rc/ 2019-03-21 01:06:16 +01:00
1105-object-selection-behaviour
1111-unexpected-behaviour-on-new-line-in-comment
1118-misaligned-comment-start
1129-capture-groups-are-broken
1195-infinite-loop-in-regex-matching Make recurse regex opt-in with a -recurse switch instead of opt-out 2018-07-05 07:54:28 +10:00
1227-segfault-on-option-access
1233-corrent-cursor-handling-for-indent-objects
1275-replaced-range-split
1308-wrong-behaviour-of-kak-indent-on-newline
1382-column-highlighter-broken-on-horizontal-scroll Re-work line trimming to fix issues with column highighters 2022-07-13 12:24:14 +10:00
1433-scrolloff-broken-with-soft-wrap
1435-misplaced-cursor-with-show_matching-hl
1453-show_whitespaces-highlighter-breaks-tab-alignment
1459-assertion-on-wrapped-long-line
1469-assert-on-repeat-insert
1504-assertion-on-incorrect-pipe-use
1518-wrong-undo-handling-with-fifo-buffers
1525-lua-indent-error
1580-A-not-moving-to-eol
1680-crash-with-dot-and-alt-semicolon
1731-wrap-hidden-buffer Add support for curly underline and separate underline color 2021-09-07 08:21:26 +10:00
1741-scrolloff-hides-end-of-lines
1829-unicode-as-string-delimiter Fix parsing of percent tokens with unicode separators 2018-02-06 20:29:08 +11:00
1902-regex-lookbehind-ignore-before-current-pos
1904-select-empty-line-indent-gets-whole-buffer
1920-crash-on-python-in-docstring
1937-opening-missing-file-by-full-path-fails Fix implementation of real_path to handle non-existing directories in / 2018-03-18 23:23:00 +11:00
1964-O-does-not-position-cursor-correctly
2030-custom-selection-nesting test: Allow expect-style UI tests, testing any var 2019-10-13 14:57:24 -04:00
2056-assert-on-small-window
2078-assert-on-restoring-invalid-selections
2129-inside-parentheses
2133-assert-on-rotate-contents
2245-wrap-long-word
2367-surround-with-tight-nesting
2420-discrepancy-in-star-behaviour
2499-html-regions-assert test: Allow expect-style UI tests, testing any var 2019-10-13 14:57:24 -04:00
2562-column-highlighter-bleeding
2711-weird-regex-highlighter-behaviour
2737-segfault-on-WinDisplay-hook
2755-segfault-on-double-wrap-highlighters
2861-backspace-merges-selections
2999-buggy-wrapping
3010-extra_word_chars-fails-with-other-buffers
3025-last-buffer-does-not-work-in-draft-context
3041-invalid-regex-highlight-accross-regions
3048-word-wrapping-broken
3219-scroll-json-ui
3270-crash-in-autocomplete
3275-crash-on-replace-at-buffer-start
3349-crash-in-completion Fix invalid access to deleted line when updating insert completion 2020-03-14 13:49:52 +11:00
3388-command-line-parsing-does-not-preserve-invalid-utf8
3398-readonly-fifo-failure
3439-parse-ascii-newline-as-return
3472-crash-on-to-sentence-start
3478-crash-on-scroll
3489-crash-on-paragraph-begin
3495-crash-highlighting-hidden-lines
3544-capture-get-lost
3669-pipe-adds-extra-newline Do not insert any end-of-line when piping data out 2022-01-24 21:53:33 +11:00
3733-modeline-parsing-off-by-one-line
3735-modeline-arbitrary-code-execution
3757-crash-on-capture-group-select
3799-incorrect-region-match
3909-crash-on-closing-buffer-with-user-mapping Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
4052-replace-range-vs-whitespace-highlighter-interaction
4086-ruby-deindenting-other-lines-than-keywords
4378-line-explicit-completion-buggy
4414-crash-on-paste-all
4460-nul-byte-in-regex
4471-crash-on-alt-t-with-one-char-file Add a regression test for <a-t> on an 'empty' file. 2022-12-26 09:17:18 -05:00
4476-invalid-line-join Fix invalid line joining logic with multiple selection per line 2021-12-20 09:13:53 +11:00
4519-regex-alternation-priority Fix regex alternation execution priority 2022-02-02 14:51:17 +11:00
4521-alt-mapping-broken-in-lower-case-modes
4601-int-min-arg Fix parsing of INT_MIN %arg 2022-05-05 20:05:24 +10:00
4605-fifo-hang Remove strace call in test that was committed by mistake 2022-06-03 16:01:58 +10:00
4659-scroll-issue-with-replace-ranges Refactor highlighting logic 2022-07-10 14:58:24 +10:00
4669-eol-highlight-to-column-highlighter Re-work line trimming to fix issues with column highighters 2022-07-13 12:24:14 +10:00
4674-show-whitespaces-horizontal-scroll-assert Remove out-of-date column computation in show-whitespaces 2022-07-19 22:47:39 +10:00
4750-crash-on-append-empty-output-at-end-of-buffer Add regression test for #4750 2022-10-19 20:33:22 +11:00
4753-assert-in-display-line-split Fix splitting of display atoms accross multi-columns codepoint 2022-10-17 17:48:39 +11:00
4779-crash-when-pasting-with-multiple-overlapping-selections Fix pasting after when selections are overlapping 2022-11-28 20:27:44 +11:00
4839-scroll-invalid-cursor Fix scroll_window not ensuring cursor lies on a codepoint start 2023-02-14 22:00:12 +11:00
4843-trim-front-split-glyph Disable trim-front-split-glyph test on platforms with broken Unicode support 2023-03-05 17:42:41 +01:00
4844-crash-on-empty-paste Fix crash when pasting at buffer end 2023-03-13 21:49:45 +11:00
4859-regex-invalid-behaviour Grow dual thread stack after pushing a thread on the next queue 2023-03-13 22:45:19 +11:00
4887-torn-utf8-sequence Stop _ from tearing multibyte UTF-8 sequences 2023-05-09 23:07:07 +02:00
4896-remap-executing-mapping map: fail if key is currently executing 2023-07-03 19:03:11 +02:00
4896-unmap-executing-mapping unmap: fail if the mapping is currently executing 2023-05-25 00:04:23 +02:00
4926-crash-with-fold-and-ranges Fix highlighters being applied to empty display buffers 2023-06-19 12:55:55 +10:00
4927-crash-jumping-to-eol Fix invalid access of display line end 2023-06-20 13:09:03 +10:00
0-assert-on-itersel test: Allow expect-style UI tests, testing any var 2019-10-13 14:57:24 -04:00
0-autocomplete-overrules-completers Make <c-n> show completion menu again when autocomplete is off 2022-02-07 14:52:51 +01:00
0-comment-after-command
0-compute-modified-range-crash
0-crash-on-backspace-at-buffer-begin
0-crash-on-BufSetOption-hook
0-crash-on-delete-buffer-BufClose
0-crash-on-pipe-with-selection-access Add + key to duplicate selections and <a-+> to merge overlapping ones 2021-02-15 09:01:14 +11:00
0-crash-on-specialy-crafted-modeline
0-crash-on-tab-just-before-wrap-column Fix crash in TabulationHighlighter when wrapping just after a tab 2023-01-23 17:39:40 +11:00
0-deindent-on-mixed-indent-line
0-mouse-during-insert Give mouse-during-insert more slack on CI, it failed again on macOS 2023-04-24 18:31:05 +02:00
0-nothing-selected-on-prompt-initial-shift-tab
0-open-below-should-not-move-cursor-on-eol Expand env vars as list of strings 2020-03-02 20:53:28 +11:00
0-replace-last-eol-with-eol
0-rotate-at-eof-mutates-selection Cleanup replaced range selection logic 2019-12-18 11:36:17 +11:00
0-select-object-with-empty-begin-match
0-spurious-undo-group-on-external
0-undo-change-at-eof