aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/mouse_spec.lua
Commit message (Collapse)AuthorAge
* vim-patch:9.0.2032: cannot get mouse click pos for tab or virt text (#25653)zeertzjq2023-10-15
| | | | | | | | | Problem: Cannot accurately get mouse clicking position when clicking on a TAB or with virtual text. Solution: Add a "coladd" field to getmousepos() result. closes: vim/vim#13335 https://github.com/vim/vim/commit/f5a94d5165bb9e390797da50a1fa7a87df3fbee4
* vim-patch:9.0.1919: Wrong curswant when clicking on empty line or with vsplitszeertzjq2023-09-21
| | | | | | | | | | Problem: Wrong curswant when clicking on empty line or with vsplits. Solution: Don't check for ScreenCols[] before the start of the window and handle empty line properly. closes: vim/vim#13132 https://github.com/vim/vim/commit/03cd697d635f1b0e7ffe21cf8244a8fb755f2ddb
* fix(extmarks): make empty "conceal" respect &conceallevel = 1 (#24785)zeertzjq2023-08-19
| | | This treats extmark conceal more like matchadd() conceal.
* test(ui/mouse_spec): mouse click with matchadd() concealed textzeertzjq2023-08-18
|
* vim-patch:9.0.1725: cursor pos wrong after concealed text with 'virtualedit'zeertzjq2023-08-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Wrong cursor position when clicking after concealed text with 'virtualedit'. Solution: Store virtual columns in ScreenCols[] instead of text columns, and always use coladvance() when clicking. This also fixes incorrect curswant when clicking on a TAB, so now Test_normal_click_on_ctrl_char() asserts the same results as the ones before patch 9.0.0048. closes: vim/vim#12808 https://github.com/vim/vim/commit/e500ae8e29ad921378085f5d70ee5c0c537be1ba Remove the mouse_adjust_click() function. There is a difference in behavior with the old mouse_adjust_click() approach: when clicking on the character immediately after concealed text that is completely hidden, cursor is put on the clicked character rather than at the start of the concealed text. The new behavior is better, but it causes unnecessary scrolling in a functional test (which is an existing issue unrelated to these patches), so adjust the test. Now fully merged: vim-patch:9.0.0177: cursor position wrong with 'virtualedit' and mouse click
* fix(mouse): drag vsep of window with 'statuscolumn' (#24462)zeertzjq2023-07-24
| | | | | | Problem: Cannot drag a vertical separator to the right of a window whose 'statuscolumn' is wider than itself. Solution: Never treat a click on a vertical separator as a click on 'statuscolumn'.
* fix(mouse): copy the line before syntax matching (#24320)zeertzjq2023-07-12
|
* refactor(options): deprecate nvim[_buf|_win]_[gs]et_optionLewis Russell2023-05-21
| | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: famiu <famiuhaque@protonmail.com>
* vim-patch:8.2.4890: inconsistent capitalization in error messageszeertzjq2023-05-05
| | | | | | | | | Problem: Inconsistent capitalization in error messages. Solution: Make capitalization consistent. (Doug Kearns) https://github.com/vim/vim/commit/cf030578b26460643dca4a40e7f2e3bc19c749aa Co-authored-by: Bram Moolenaar <Bram@vim.org>
* fix(mouse): fix popup menu position check with winbar (#23456)zeertzjq2023-05-03
|
* fix(pum): position properly with ext_multigrid (#23336)zeertzjq2023-04-27
|
* fix(statusline): also allow right click when 'mousemodel' is "popup*" (#23258)luukvbaal2023-04-25
| | | | | Problem: The 'statusline'-format ui elements do not receive right click events when "mousemodel" is "popup*" Solution: Do not draw popupmenu and handle click event instead.
* fix(options): fix local 'sidescrolloff' doesn't work for mouse (#21162)zeertzjq2022-11-23
| | | Missing part of Vim patch 8.1.0864.
* vim-patch:9.0.0739: mouse column not correctly used for popup_setpos (#20729)zeertzjq2022-10-19
| | | | | | | | Problem: Mouse column not correctly used for popup_setpos. Solution: Adjust off-by-one error and handle Visual line selection properly. (Yee Cheng Chin, closes vim/vim#11356) https://github.com/vim/vim/commit/17822c507c03d509037c9ee5eee5cfbb201b3f01 The test_termcodes.vim test cannot be used. Use a Lua test instead.
* fix(input): use click number of last click for mouse drag (#20300)zeertzjq2022-09-24
|
* feat(api): add "move" to nvim_input_mousezeertzjq2022-09-04
|
* fix(tests): remove irrelevant usage of display-=msgsepbfredl2022-08-17
| | | | | | | | These were just added to avoid churn when changing the default of 'display'. To simplify message handling logic, we might want to remove support for printing messages in default_grid later on. This would allow things like printing error messages safely in the middle of redraw, or a future graduation of the 'multigrid' feature.
* test: improve some input testszeertzjq2022-07-25
|
* fix(mouse): fix using uninitialized memory with K_MOUSEMOVE (#19480)zeertzjq2022-07-24
| | | Fix a mistake in the porting of Vim patch 8.0.1309.
* feat(defaults): mouse=nvi #19290matveyt2022-07-17
| | | | | | | | | | Problem: Since right-click can now show a popup menu, we can provide messaging to guide users who expect 'mouse' to be disabled by default. So 'mouse' can now be enabled by default. Solution: Do it. Closes #15521
* refactor(ui)!: link `VertSplit` to `Normal` by defaultFamiu Haque2022-05-15
| | | | | Avoids using `gui=reverse` on `VertSplit` and makes window separators look much nicer by default.
* fix(input): do not translate scroll keys into multiclickszeertzjq2022-04-02
|
* fix(mouse): correct dragged position in composed layoutBjörn Linse2021-10-04
|
* test: add a test for getmousepos()Daniel Steinberg2021-09-29
|
* ui: make 'mouse' handling in external UI more consistentBjörn Linse2021-01-01
| | | | | | | | | before the behaviour of 'mouse' was inconsistent in external UI, as some remapping logic would check has_mouse() and others don't (no difference in TUI or vim classic). With this change, the behaviour is consistently up to the UI decide (see ui.txt edit) Behaviour of tui.c is unaffected by this change.
* A Mudholland Dr. RecastBjörn Linse2020-10-19
| | | | | The commit summary maybe does not make sense, but calling a function that does not wait on anything `wait()` makes even less sense.
* options: make 'fillchars' and 'listchars' global-localBjörn Linse2019-11-26
| | | | | | | | | These options were previously global. A global-local window option behaves closer to a global option "per default" (i e with :set), but still supports local behavior via :setl Also this restores back-compat for nvim_set_option("fcs", ...) which are currently broken on 0.4.x but worked in earlier versions
* tests/ui: remove unnecessary screen:detach()Björn Linse2019-10-13
| | | | | | | | | | | | | It is perfectly fine and expected to detach from the screen just by the UI disconnecting from nvim or exiting nvim. Just keep detach() in screen_basic_spec, to get some coverage of the detach method itself. This avoids hang on failure in many situations (though one could argue that detach() should be "fast", or at least "as fast as resize", which works in press-return already). Never use detach() just to change the size of the screen, try_resize() method exists for that specifically.
* tests/ui: cleanup illegitimate usages of "attr_ignore"Björn Linse2019-10-13
| | | | | "attr_ignore" is an anti-pattern, with snapshot_util() just include all the highlights already.
* test: fix screen assertionsJan Edmund Lazo2019-10-01
|
* tests: re-enable "tab drag in tabline to the left moves tab left" (#10588)Daniel Hahler2019-07-24
| | | Ref: https://github.com/neovim/neovim/pull/4874
* vim-patch:8.1.0994: fix relative cursor position #9676Justin M. Keyes2019-03-09
| | | | | | Problem: Relative cursor position is not calculated correctly. Solution: Always set topline, also when window is one line only. (Robert Webb) Add more info to getwininfo() for testing. https://github.com/vim/vim/commit/8fcb60f961bdd134599fb016c6537fd496e800f5
* tests: fix mouse tests that use lcs=eol:$Marco Hinz2019-01-26
| | | | | | | Previously the mouse tests set 'listchars', but not 'list'. Funnily enough, the space, where the `$` would normally appear, would still use new highlight group. Set 'list' for good and fix the tests accordingly.
* ui: multigrid mouse supportBjörn Linse2019-01-20
|
* screen: don't unconditionally clear messages on window scrollBjörn Linse2019-01-15
| | | | | | | | | | | | | | | In vim, scrolling a window might mess up the cmdline. To keep it simple, cmdline was always cleared for any window scroll. In nvim, where safe scrolling is implemented in the TUI layer, this problem doesn't exist. Clearing the message on scrolling, when we not do it e.g when switching tabs is a bit weird, as the former is a much smaller context change. A vim patch introduced the possibility to avoid the cmdlline clear for redraws caused by async events. This case will now trivially be covered, as the redraw is always avoided. vim-patch:8.0.0592: if a job writes to a buffer screen is not updated
* test: add tests for conceal cursor movementBjörn Linse2019-01-13
|
* ui: disable clearing almost everywhereBjörn Linse2018-10-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid clearing the screen in most situations. NOT_VALID should be equivalent to CLEAR unless some external force messed up the terminal, for these situations <c-l> and :mode will still clear the screen. Also eliminate some obsolete code in screen.c, that dealt with that in vim drawing window 1 can mess up window 2, but this never happens in nvim. But what about slow terminals? There is two common meanings in which a terminal is said to be "slow": Most commonly (and in the sense of vim:s nottyfast) it means low bandwidth for sending bytes from nvim to the terminal. If the screen is very similar before and after the update_screen(CLEAR) this change should reduce bandwidth. If the screen is quite different, but there is no new regions of contiguous whitespace, clearing doesn't reduce bandwidth significantly. If the new screen contains a lot of whitespace, it will depend of if vsplits are used or not: as long as there is no vsplits, ce is used to cheaply clear the rest of the line, so full-screen clear is not needed to reduce bandwith. However a left vsplit currently needs to be padded with whitespace all the way to the separator. It is possible ec (clear N chars) can be used to reduce bandwidth here if this is a problem. (All of this assumes that one doesn't set Normal guibg=... on a non-BCE terminal, if you do you are doomed regardless of this change). Slow can also mean that drawing pixels on the screen is slow. E-ink screens is a recent example. Avoiding clearing and redrawing the unchanged part of the screen will always improve performance in these cases.
* tests: improve robustness of immediate successes in screen testsBjörn Linse2018-10-15
|
* msg: do not scroll entire screen (#8088)Björn Linse2018-03-31
|
* 'fillchars': fix defaults logic; handle ambiwidth=double #7986Matthieu Coudron2018-02-23
| | | | Update tests.
* defaults: sidescroll=1Justin M. Keyes2018-02-09
| | | | ref #6289
* Updated testsTommy Allen2018-01-28
|
* win: enable more functional testsJan Edmund Lazo2018-01-06
| | | | | | - plugin/shada_spec.lua: Use \r\n as Windows EOL for tests on BufWriteCmd, FileWriteCmd, FileAppendCmd. Alternative is 'set fileformat=unix'.
* test: mouse_spec: remove obnoxious wait times (#7029)Justin M. Keyes2017-07-15
| | | | | helpers.skip_fragile() already skips the problematic tests on the ASan build. But the 15s timeout plus 5s 'mousetime' cause the tests to take 1+ minutes anyways.
* functests: Replace execute with either command or feed_commandZyX2017-04-09
| | | | | | | | | | Hope this will make people using feed_command less likely: this hides bugs. Already found at least two: 1. msgpackparse() will show internal error: hash_add() in case of duplicate keys, though it will still work correctly. Currently silenced. 2. ttimeoutlen was spelled incorrectly, resulting in option not being set when expected. Test was still functioning somehow though. Currently fixed.
* 'guicursor': Empty means "block cursor in all modes".Justin M. Keyes2017-04-01
| | | | Also: update default 'guicursor' to match the documentation.
* terminal: Keep cursor position.Justin M. Keyes2017-03-01
| | | | | | Let the terminal dictate the normal-mode cursor position. This will be disorienting sometimes, but it is closer to what users expect vs always going to the last line.
* test: skip_fragile(), TEST_SKIP_FRAGILEJustin M. Keyes2017-01-04
| | | | | | | Let build systems define TEST_SKIP_FRAGILE to skip tests that are known to be resource-intensive (unreliable on slow systems). References https://github.com/neovim/neovim/pull/5488#issuecomment-265622113
* test: Disable unreliable tests on travis+ASAN_UBSANJustin M. Keyes2016-12-07
|
* CI: Travis macOS: Skip tab left-drag tests.Justin M. Keyes2016-09-12
| | | | | | These tests fail on master, so it's not a regression. Changes in #4874 (parent commit) seem to work (and pass most CI), so skipping these tests is better than blocking the changes.