summaryrefslogtreecommitdiffstats
path: root/src/mouse.c
AgeCommit message (Collapse)Author
2024-03-28patch 9.1.0215: Half-page scrolling does not support smooth-scrollingv9.1.0215Luuk van Baal
Problem: Page-wise scrolling with Ctrl-D/Ctrl-U implements it's own logic to change the topline and cursor. More logic than necessary for scrolling with Ctrl-F/Ctrl-B was removed in patch 9.1.0211. Solution: Re-use the logic from Ctrl-E/Ctrl-Y/Ctrl-F/Ctrl-B while staying backward compatible as much as possible. Restore some of the logic that determined how many lines will be scrolled (Luuk van Baal) closes: #14316 Signed-off-by: Luuk van Baal <luukvbaal@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-16patch 9.1.0184: Cursor pos wrong when clicking with conceal and wrapv9.1.0184zeertzjq
Problem: Cursor position wrong when clicking with conceal and wrap. Solution: Use the virtual column of the last char for ScreenCols[] in boguscols. Remove use of MAXCOL in ScreenCols[]. Rename third argument of wlv_screen_line() to "clear_end" as that's clearer what it does (zeertzjq). related: 14192 closes: #14200 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-06patch 9.1.0077: Unnecessary call to redraw_for_cursorline() in nv_mousescroll()v9.1.0077zeertzjq
Problem: The call to redraw_for_cursorline() in nv_mousescroll() is unnecessary because redraw_for_cursorline() only sets redraw type to UPD_VALID, and all code paths in do_mousescroll() already set redraw type to at least UPD_VALID. Solution: Remove call to redraw_for_cursorline() in nv_mousescroll(). (zeertzjq) closes: #13979 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-23patch 9.1.0047: issues with temp curwin/buf while cmdwin is openv9.1.0047Sean Dewar
Problem: Things that temporarily change/restore curwin/buf (e.g: win_execute, some autocmds) may break assumptions that curwin/buf is the cmdwin when "cmdwin_type != 0", causing issues. Solution: Expose the cmdwin's real win/buf and check that instead. Also try to ensure these variables are NULL if "cmdwin_type == 0", allowing them to be used directly in most cases without checking cmdwin_type. (Sean Dewar) Alternatively, we could ban win_execute in the cmdwin and audit all places that temporarily change/restore curwin/buf, but I didn't notice any problems arising from allowing this (standard cmdwin restrictions still apply, so things that may actually break the cmdwin are still forbidden). closes: #12819 Signed-off-by: Sean Dewar <seandewar@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-19patch 9.0.2177: Wrong cursor position when dragging out of windowv9.0.2177zeertzjq
Problem: Wrong cursor position when dragging out of window. Solution: Don't use ScreenCols[] when mouse is not in current window. closes: #13717 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-15patch 9.0.2032: cannot get mouse click pos for tab or virt textv9.0.2032zeertzjq
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: #13335 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-10-14patch 9.0.2022: getmousepos() returns wrong index for TAB charv9.0.2022zeertzjq
Problem: When clicking in the middle of a TAB, getmousepos() returns the column of the next char instead of the TAB. Solution: Break out of the loop when the vcol to find is inside current char. Fix invalid memory access when calling virtcol2col() on an empty line. closes: #13321 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-09-21patch 9.0.1923: curswant wrong on click with 've' and 'wrap' setv9.0.1923zeertzjq
Problem: curswant wrong on click with 've' and 'wrap' set Solution: Add w_leftcol to mouse click column. closes: #13142 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-09-20patch 9.0.1919: Wrong curswant when clicking on empty line or with vsplitsv9.0.1919zeertzjq
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: #13132 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-09-09patch 9.0.1886: Various Typosv9.0.1886Christian Brabandt
Problem: Various Typos Solution: Fix Typos This is a collection of typo related commits. closes: #12753 closes: #13016 Co-authored-by: Adri Verhoef <a3@a3.xs4all.nl> Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Viktor Szépe <viktor@szepe.net> Co-authored-by: nuid64 <lvkuzvesov@proton.me> Co-authored-by: Meng Xiangzhuo <aumo@foxmail.com> Co-authored-by: Dominique Pellé <dominique.pelle@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-17patch 9.0.1725: cursor pos wrong after concealed text with 'virtualedit'v9.0.1725zeertzjq
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: #12808 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-02-21patch 9.0.1336: functions without arguments are not always declared properlyv9.0.1336Yegappan Lakshmanan
Problem: Functions without arguments are not always declared properly. Solution: Use "(void)" instead of "()". (Yegappan Lakshmanan, closes #12031)
2022-11-23patch 9.0.0931: MS-Windows: mouse column limited to 223v9.0.0931Christopher Plewright
Problem: MS-Windows: mouse column limited to 223. Solution: Use two bytes for each mouse coordinate. Add the mouse position to scroll events. (Christopher Plewright, closes #11597)
2022-11-22patch 9.0.0917: the WinScrolled autocommand event is not enoughv9.0.0917Bram Moolenaar
Problem: The WinScrolled autocommand event is not enough. Solution: Add WinResized and provide information about what changed. (closes #11576)
2022-11-19patch 9.0.0911: with 'smoothscroll' set mouse click position may be wrongv9.0.0911Yee Cheng Chin
Problem: With 'smoothscroll' set mouse click position may be wrong. Solution: Adjust computations for w_skipcol. (Yee Cheng Chin, closes #11514)
2022-11-19patch 9.0.0906: mouse scroll code is not optimalv9.0.0906Christopher Plewright
Problem: Mouse scroll code is not optimal. Solution: Properly organise Normal mode, Insert mode and common code. (Christopher Plewright, closes #11572)
2022-11-18patch 9.0.0902: some mouse scroll code is not in a good placev9.0.0902Christopher Plewright
Problem: Some mouse scroll code is not in a good place. Solution: Refactor the code. (Christopher Plewright, closes #11561)
2022-11-18patch 9.0.0901: setting w_leftcol and handling side effects is confusingv9.0.0901Bram Moolenaar
Problem: Setting w_leftcol and handling side effects is confusing. Solution: Use a function to set w_leftcol() and handle side effects.
2022-11-15patch 9.0.0886: horizontal mouse scroll only works in the GUIv9.0.0886Christopher Plewright
Problem: Horizontal mouse scroll only works in the GUI. Solution: Make horizontal mouse scroll also work in a terminal. (Christopher Plewright, closes #11448)
2022-11-01patch 9.0.0825: cannot drag an entry in the tabpage linev9.0.0825zeertzjq
Problem: Cannot drag an entry in the tabpage line. Solution: Clear dragwin instead of got_click. (closes #11483, closes #11482)
2022-10-31patch 9.0.0822: crash when dragging the statusline with a mappingv9.0.0822Bram Moolenaar
Problem: Crash when dragging the statusline with a mapping. Solution: Check for valid window pointer. (issue #11427)
2022-10-13patch 9.0.0739: mouse column not correctly used for popup_setposv9.0.0739Yee Cheng Chin
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 #11356)
2022-10-04patch 9.0.0657: too many #ifdefsv9.0.0657Martin Tournoij
Problem: Too many #ifdefs. Solution: Graduate the +cmdwin feature. Now the tiny and small builds are equal, drop the small build. (Martin Tournoij, closes #11268)
2022-08-24patch 9.0.0259: crash with mouse click when not initializedv9.0.0259Bram Moolenaar
Problem: Crash with mouse click when not initialized. Solution: Check TabPageIdxs[] is not NULL.
2022-08-14patch 9.0.0206: redraw flags are not named specificallyv9.0.0206Bram Moolenaar
Problem: Redraw flags are not named specifically. Solution: Prefix "UPD_" to the flags, for UPDate_screen().
2022-08-09patch 9.0.0177: cursor position wrong with 'virtualedit' and mouse clickv9.0.0177Bram Moolenaar
Problem: Cursor position wrong with 'virtualedit' and mouse click after end of the line. (Hermann Mayer) Solution: Do not use ScreenCols[] when 'virtualedit' is active. (closes #10868)
2022-08-03patch 9.0.0136: after CTRL-Left-mouse click a mouse scroll also has CTRLv9.0.0136Bram Moolenaar
Problem: After CTRL-Left-mouse click a mouse scroll also has CTRL. Solution: Reset orig_mouse_code also for wheel events. (closes #10840)
2022-07-25patch 9.0.0067: cannot show virtual textv9.0.0067Bram Moolenaar
Problem: Cannot show virtual text. Solution: Initial changes for virtual text support, using text properties.
2022-07-09patch 9.0.0048: cursor in wrong column with mouse click after concealed textv9.0.0048Bram Moolenaar
Problem: Cursor in wrong column with mouse click after concealed text. Solution: Store the text column when drawing text.
2022-07-04patch 9.0.0036: 'fillchars' cannot have window-local valuesv9.0.0036Bram Moolenaar
Problem: 'fillchars' cannot have window-local values. Solution: Make 'fillchars' global-local. (closes #5206)
2022-06-16patch 8.2.5107: some callers of rettv_list_alloc() check for not OKv8.2.5107Bram Moolenaar
Problem: Some callers of rettv_list_alloc() check for not OK. (Christ van Willegen) Solution: Use "==" instead of "!=" when checking the return value.
2022-05-21patch 8.2.4993: smart/C/lisp indenting is optionalv8.2.4993Bram Moolenaar
Problem: smart/C/lisp indenting is optional, which makes the code more complex, while it only reduces the executable size a bit. Solution: Graduate FEAT_CINDENT, FEAT_SMARTINDENT and FEAT_LISP.
2022-05-20patch 8.2.4984: dragging statusline fails for window with winbarv8.2.4984zeertzjq
Problem: Dragging statusline fails for window with winbar. Solution: Fix off-by-one error. (closes #10448)
2022-05-09patch 8.2.4928: various white space and cosmetic mistakesv8.2.4928Bram Moolenaar
Problem: Various white space and cosmetic mistakes. Solution: Change spaces to tabs, improve comments.
2022-05-07patch 8.2.4911: the mode #defines are not clearly namedv8.2.4911Bram Moolenaar
Problem: The mode #defines are not clearly named. Solution: Prepend MODE_. Renumber them to put the mapped modes first.
2022-05-07patch 8.2.4902: mouse wheel scrolling is inconsistentv8.2.4902LemonBoy
Problem: Mouse wheel scrolling is inconsistent. Solution: Use the MS-Winows system setting. (closes #10368)
2022-04-21patch 8.2.4803: WinScrolled not always triggered when scrolling with mousev8.2.4803LemonBoy
Problem: WinScrolled not always triggered when scrolling with the mouse. Solution: Add calls to may_trigger_winscrolled(). (closes #10246)
2022-04-05patch 8.2.4692: no test for what 8.2.4691 fixesv8.2.4692zeertzjq
Problem: No test for what 8.2.4691 fixes. Solution: Add a test. Use a more generic sotlution. (closes #10090)
2022-04-03patch 8.2.4677: the Athena GUI support is outdatedv8.2.4677Bram Moolenaar
Problem: The Athena GUI support is outdated. Solution: Remove the Athena GUI code.
2022-03-15patch 8.2.4568: getmousepos() does not compute the column below the last linev8.2.4568Sean Dewar
Problem: getmousepos() does not compute the column below the last line. Solution: Also compute the column when the mouse is below the last line. (Sean Dewar, closes #9946)
2022-03-13patch 8.2.4561: build failure with some combination of featuresv8.2.4561Bram Moolenaar
Problem: Build failure with some combination of features. (John Marriott) Solution: Adjust #ifdef.
2022-03-13patch 8.2.4559: getmousepos() returns the screen columnv8.2.4559Bram Moolenaar
Problem: getmousepos() returns the screen column. (Ernie Rael) Solution: Return the text column, as documented.
2022-03-13patch 8.2.4555: getmousepos() returns the wrong columnv8.2.4555Bram Moolenaar
Problem: getmousepos() returns the wrong column. (Ernie Rael) Solution: Limit to the text size, not the number of bytes.
2021-11-29patch 8.2.3697: cannot drag a popup without a borderv8.2.3697Bram Moolenaar
Problem: Cannot drag a popup without a border. Solution: Add the "dragall" option. (closes #9218)
2021-11-26patch 8.2.3681: cannot drag popup window after click on a status linev8.2.3681Bram Moolenaar
Problem: Cannot drag popup window after click on a status line. (Sergey Vlasov) Solution: Reset on_status_line. (closes #9221)
2021-06-03patch 8.2.2932: select mode test failsv8.2.2932Bram Moolenaar
Problem: Select mode test fails. Solution: Do not always reset the held mouse button.
2021-06-03patch 8.2.2930: when a popup is visible a mouse move my restart Visual modev8.2.2930Bram Moolenaar
Problem: When a popup is visible a mouse move my restart Visual mode. Solution: Reset held_button when ending Visual mode. (closes #8318)
2021-02-17patch 8.2.2524: cannot change the characters displayed in the foldcolumnv8.2.2524Bram Moolenaar
Problem: Cannot change the characters displayed in the foldcolumn. Solution: Add fields to 'fillchars'. (Yegappan Lakshmanan, Matthieu Coudron, closes #7860)
2020-11-02patch 8.2.1942: insufficient test coverage for the Netbeans interfacev8.2.1942Bram Moolenaar
Problem: Insufficient test coverage for the Netbeans interface. Solution: Add more tests. Fix an uncovered bug. (Yegappan Lakshmanan, closes #7240)
2020-09-08patch 8.2.1637: Vim9: :put ={expr} does not work inside :def functionv8.2.1637Bram Moolenaar
Problem: Vim9: :put ={expr} does not work inside :def function. Solution: Add ISN_PUT. (closes #6397)