aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir/test_gui.vim
Commit message (Collapse)AuthorAge
* vim-patch:8.2.0904: assuming modifyOtherKeys for rhs of mapping (#38970)Jan Edmund Lazo2026-04-12
| | | | | | | | | | | | | | | | Problem: Assuming modifyOtherKeys for rhs of mapping. Solution: Ignore seenModifyOtherKeys for mapped characters. (closes vim/vim#6200) https://github.com/vim/vim/commit/46cd43bda102c3782bba1c4c629836e010734d77 ---- "getchar.c" changes depend on patch 8.1.2145. Can't port it due to tests. "test_gui.vim" doesn't depend on GUI for all tests. ---- Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.1.1623: Buffer menu does not handle unicode names correctly (#35353)zeertzjq2025-08-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Buffer menu does not handle unicode names correctly (after v9.1.1622) Solution: Fix the BMHash() function (Yee Cheng Chin) The Buffers menu uses a BMHash() function to generate a sortable number to be used for the menu index. It used a naive (and incorrect) way of encoding multiple ASCII values into a single integer, but assumes each character to be only in the ASCII 32-96 range. This means if we use non-ASCII file names (e.g. Unicode values like CJK or emojis) we get integer underflow and overflow, causing the menu index to wrap around. Vim's GUI implementations internally use a signed 32-bit integer for the `gui_mch_add_menu_item()` function and so we need to make sure the menu index is in the (0, 2^31-1) range. To do this, if the file name starts with a non-ASCII value, we just use the first character's value and set the high bit so it sorts after the other ASCII ones. Otherwise, we just take the first 5 characters, and use 5 bit for each character to encode a 30-bit number that can be sorted. This means Unicode file names won't be sorted beyond the first character. This is likely going to be fine as there are lots of ways to query buffers. related: vim/vim#17403 closes: vim/vim#17928 https://github.com/vim/vim/commit/8f9de4991e84dfdc9bcc9dad0eaa2b3544ef963e Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
* vim-patch:9.1.1622: Patch v9.1.1432 causes performance regressions (#35288)zeertzjq2025-08-10
| | | | | | | | | | | | | | | | | | | | | | Problem: Patch v9.1.1432 causes performance regressions Solution: Revert "patch 9.1.1432: GTK GUI: Buffer menu does not handle unicode correctly" (Yee Cheng Chin). This reverts commit 08896dd330c6dc8324618fde482db968e6f71088. The previous change to support Unicode characters properly in the buffers menu resorted to removing all buffer menus and re-add the buffers after doing a sort, per each buffer addition. This was quite slow because if Vim is trying to load in multiple buffers at once (e.g. when loading a session) this scales in O(n^2) and Vim can freeze for dozens of seconds when adding a few hundred buffers. related: vim/vim#17405 related: vim/vim#17928 fixes: vim/vim#17897 https://github.com/vim/vim/commit/cda0d17f5937c9e09d6821da64e57d589fd3c404 Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
* vim-patch:9.1.1432: GTK GUI: Buffer menu does not handle unicode correctly ↵zeertzjq2025-06-05
| | | | | | | | | | | | | (#34313) Problem: GTK GUI: Buffer menu does not handle unicode correctly Solution: Get rid of the BMHash() function (SUN Haitao) fixes: vim/vim#17403 closes: vim/vim#17405 https://github.com/vim/vim/commit/08896dd330c6dc8324618fde482db968e6f71088 Co-authored-by: SUN Haitao <sunhaitao@devtaste.com>
* test: move oldtests to test directory (#22536)dundargoc2023-03-07
The new oldtest directory is in test/old/testdir. The reason for this is that many tests have hardcoded the parent directory name to be 'testdir'.