aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/mouse.c
Commit message (Collapse)AuthorAge
* vim-patch:8.1.2057: the screen.c file is much too bigLewis Russell2022-08-19
| | | | | | | | | | | | | | | Problem: The screen.c file is much too big. Solution: Split it in three parts. (Yegappan Lakshmanan, closes vim/vim#4943) https://github.com/vim/vim/commit/7528d1f6b5422750eb778dfb550cfd0b0e540964 This is an approximation vim-patch 8.1.2057. Applying the patch directly isn't feasible since our version of screen.c has diverged too much, however we still introduce drawscreen.c and drawline.c: - screen.c is now a much smaller file used for low level screen functions - drawline.c contains everything needed for win_line() - drawscreen.c contains everything needed for update_screen() Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* refactor: remove some unused includes (#19820)zeertzjq2022-08-17
| | | Replace grid.h in screen.h and screen.h in buffer.h with grid_defs.h
* refactor: change pre-decrement/increment to post (#19799)Lewis Russell2022-08-16
| | | Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* fix: right-click in clickable statusline #19252Famiu Haque2022-07-15
| | | | | | | | | | | | Problem: 1. Right-click does not work in statusline unless you left-click first (to focus the statusline). 2. Modifier (e.g. shift+rightclick) does not work in statusline. Solution: Make clickable statusline sections receive right-clicks regardless of whether the statusline is focused. Closes #18994
* feat: add 'mousescroll' option (#12355)Jay2022-07-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add 'mousescroll' option to control how many lines to scroll by when a mouse wheel keycode is received. The mousescroll option controls both horizontal and vertical scrolling. The option is a string in the format: set mousescroll=direction:count,direction:count Where direction is either "ver" or "hor", and count is a non negative integer. If a direction is omitted, a default value is used. The default values remain unchanged, that is 3 for vertical scrolling, and 6 for horizontal scrolling. As such, the mousescroll default is "ver:3,hor:6". Add mousescroll documentation - Add option documentation in options.txt - Add brief summary in quickref.txt Update :help scroll-mouse-wheel - Mention mousescroll option as a means of controlling scrolling. - Remove obsolete suggestion to map scroll wheel keys to <C-U> to scroll by a single line -- users should prefer the mousescroll option. - Add some information about the consequences of remapping scroll wheel keys (they lose their magic ability to affect inactive windows). Update :help vim-differences - Add brief mousescroll summary under Options Add mousescroll tests - Test option validation - Test default mousescroll value and behavior - Test fallback to default values - Test mouse vertical and horizontal scrolling in normal mode - Test mouse vertical and horizontal scrolling in insert mode
* vim-patch:8.0.1558: no right-click menu in a terminalzeertzjq2022-07-01
| | | | | | Problem: No right-click menu in a terminal. Solution: Implement the right click menu for the terminal. https://github.com/vim/vim/commit/aef8c3da2ba59285b7cfde559ae21cdce6ba6919
* refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)dundargoc2022-05-25
|
* feat: click support for 'statusline', 'winbar' #18650Famiu Haque2022-05-23
| | | | The mouseclick item "%@" is now supported by 'statusline' and 'winbar'. Previously it was only supported by 'tabline'.
* fix(mouse): fix mouse drag position with winbar or border in multigridzeertzjq2022-05-19
|
* fix(mouse): fix mouse drag position with winbarzeertzjq2022-05-19
|
* Merge pull request #18620 from bfredl/multibarbfredl2022-05-18
|\ | | | | fix(ui): make winbar work with floats and multigrid
| * refactor: grid->rows and grid->colsbfredl2022-05-18
| |
* | fix(ui): set correct position on mouse click when 'winbar' is enabledFamiu Haque2022-05-18
|/
* feat(ui): add `'winbar'`Famiu Haque2022-05-18
| | | | | | | Adds support for a bar at the top of each window, enabled through the `'winbar'` option. Co-authored-by: Björn Linse <bjorn.linse@gmail.com>
* refactor: replace char_u variables and functions with charDundar Goc2022-05-07
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor(uncrustify): change rules to better align with the style guideDundar Goc2022-04-29
| | | | | | | | | | | | | Add space around arithmetic operators '+' and '-'. Remove space between back-to-back parentheses, i.e. ')(' vs. ') ('. Remove space between '((' or '))' of control statements. Add space between ')' and '{' of control statements. Remove space between function name and '(' on function declaration. Collapse empty blocks between '{' and '}'. Remove newline at the end of the file. Remove newline between 'enum' and '{'. Remove newline between '}' and ')' in a function invocation. Remove newline between '}' and 'while' of 'do' statement.
* vim-patch:8.2.4559: getmousepos() returns the screen columnSean Dewar2022-03-15
| | | | | | | | | Problem: getmousepos() returns the screen column. (Ernie Rael) Solution: Return the text column, as documented. https://github.com/vim/vim/commit/533870a98501fac2b51ef4bc489fac3a055a41a9 Re-introduce vcol2col, which was removed in 71b1f4e for being unused. Move it to mouse.c (like in v8.1.2062, which hasn't been ported yet).
* refactor(misc1): move out high-level input functions to a new file: input.cBjörn Linse2021-12-10
| | | | | Possibly dialog code is messages.c could be moved here as well. misc1.c is now empty, so delete it.
* refactor: saner options for uncrustify (#16204)dundargoc2021-11-19
| | | | | | | | | | | | | | | | | | | | | | | | * sp_enum_after_assign = force * sp_brace_typedef = force * nl_do_brace = remove * sp_do_brace_open = force * sp_brace_close_while = force * sp_before_semi = remove * sp_before_semi_for = remove * sp_before_semi_for_empty = remove * sp_between_semi_for_empty = remove * sp_after_semi_for_empty = remove * sp_before_square = remove * sp_before_squares = remove * sp_inside_square = remove * sp_inside_fparens = remove * sp_inside_fparen = remove * sp_inside_tparen = remove * sp_after_tparen_close = remove * sp_return_paren = force * pos_bool = lead * sp_pp_concat = remove * sp_pp_stringify = remove * fixup: disable formatting for the INIT section
* refactor: remove superfluous function-like macros #15918dundargoc2021-10-06
| | | | | | | | | Remove following macros: CONVERTED HMLL_ITER_BACK PACK_STRUCT IGNORE_BUF find_shada_parameter path_try_shorten_fname
* fix(mouse): correct dragged position in composed layoutBjörn Linse2021-10-04
|
* feat(decorations): support virtual lines (for now: only one block at a time)Björn Linse2021-09-26
|
* refactor: format with uncrustify #15741dundargoc2021-09-22
|
* fix(mouse.c): fix mouse drag positions on multigrid #12667Ville Hakulinen2021-09-10
| | | | | | | Currently, multigrid mouse drag positions are handled incorrectly if the drag event is not in the top left grid. Fix this by not adjusting the position of the event in jump_to_mouse. related: #15091
* fix(multigrid): #15075 mouse events crash neovimYatao Li2021-09-08
|
* refactor(plines): move horizontal size functions to plines.cBjörn Linse2021-08-11
| | | | fix style.
* refactor(plines): remove implicit curwin chartabsize() functionBjörn Linse2021-08-10
|
* refactor(plines): move out plines related code from misc1.cBjörn Linse2021-08-10
|
* refactor(plines): remove implicit curwin plines() functionBjörn Linse2021-08-10
|
* refactor: replace TRUE/FALSE macros with C99 true/falseDundar Göc2021-07-25
|
* clang/'Logic error': avoid nullptr derefJan Edmund Lazo2021-04-02
| | | | mouse_find_win() can return NULL.
* floats: add borders (MS-DOS MODE)Björn Linse2021-03-22
|
* w_grid_alloc: baseline implBjörn Linse2021-03-22
|
* Fix click on foldcolumn with vsplit (#14127)tk-shirasaka2021-03-13
|
* [RDY] Fix click on foldcolumn if it has tabline (#13982)tk-shirasaka2021-03-04
| | | | | | | * Fix click on foldcolumn if it has tabline * Fixes to correctly determine if tablie was clicked when multigrid is enabled * Separate foldcolumn checks into functions * Add test case for click on foldcolumn with split window * Fix foldcolumn click used nvim_input() on multigrid enabled
* 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.
* menu: remove winbar codeJan Edmund Lazo2020-11-20
| | | | | | | | | No unmerged Vim patch, applicable to Neovim, depend on WinBar feature. It was merged only for merging Vim patches. It is currently useless in Neovim. Remove it to avoid rendering issues. Close https://github.com/neovim/neovim/issues/12689
* Fix alignment issueShirasaka2020-11-10
|
* ui: Fix click on foldcolumn when ext_multigrid is enabledShirasaka2020-11-09
|
* vim-patch:8.2.1942: insufficient test coverage for the Netbeans interfaceJan Edmund Lazo2020-11-02
| | | | | | | | | | | | | | | Problem: Insufficient test coverage for the Netbeans interface. Solution: Add more tests. Fix an uncovered bug. (Yegappan Lakshmanan, closes vim/vim#7240) https://github.com/vim/vim/commit/dbfa795d8b66c99ee758b132d6043871b9061563 N/A patches for version.c: vim-patch:8.2.1165: insufficient testing for the Tcl interface Problem: Insufficient testing for the Tcl interface. Solution: Add more tests. (Yegappan Lakshmanan, closes vim/vim#6423) https://github.com/vim/vim/commit/e4358906fdbd0b2df1889dad49c79a9c8cee5ac4
* api: add API for themesBjörn Linse2020-11-01
| | | | | | | | | | co-author: hlpr98 <hlpr98@gmail.com> (dict2hlattrs function) orange is sus?? NOVEMBER DAWN erase the lie that is redraw_later()
* vim-patch:8.0.1292: quick clicks in the WinBar start Visual modeJan Edmund Lazo2020-04-26
| | | | | | Problem: Quick clicks in the WinBar start Visual mode. Solution: Use a double click in the WinBar like a normal click. https://github.com/vim/vim/commit/d327b0c68fa9b32877123f77560f4521a9eb39db
* vim-patch:8.0.1138: click in window toolbar starts Visual modeJan Edmund Lazo2020-04-26
| | | | | | Problem: Click in window toolbar starts Visual mode. Solution: Add the MOUSE_WINBAR flag. https://github.com/vim/vim/commit/eb163d73b11c10b461a2839530173a33d7915a33
* vim-patch:8.0.1123: cannot define a toolbar for a windowJan Edmund Lazo2020-04-26
| | | | | | | | | | Problem: Cannot define a toolbar for a window. Solution: Add a window-local toolbar. https://github.com/vim/vim/commit/1b9645de3c05f37b5c30e78f999351b0cf486ade "WinBar" code in "screen.c" was not ported. Fix https://github.com/neovim/neovim/issues/11513#issuecomment-562012827
* foldcolumn: allow auto:XMatthieu Coudron2020-02-29
| | | | | | | | Similar to signcolumn, allow foldcolumn to adapt itself to the number of folds. Regression: vim supports a maximum fdc of 12, this limits it to 9.
* mouse.c: can click on multibyte foldopen/foldclose (#11863)Matthieu Coudron2020-02-14
| | | | | would previously only work with ascii fillchars. Added a test.
* Merge #11568 'fillchars: foldopen, foldsep, foldclose'Justin M. Keyes2019-12-26
|\
| * fillchars: adding foldopen, foldsep, foldcloseMatthieu Coudron2019-12-25
| | | | | | | | | | You can try it with set fillchars+=foldopen:▾,foldsep:│,foldclose:▸
* | clang/'Dead store': remove dead codeJan Edmund Lazo2019-12-26
|/
* UI: emit mouse_on/mouse_off on attach #11455Justin M. Keyes2019-11-25
| | | closes #11372