Age | Commit message (Collapse) | Author |
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Problem: Functions without arguments are not always declared properly.
Solution: Use "(void)" instead of "()". (Yegappan Lakshmanan, closes #12031)
|
|
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)
|
|
Problem: The WinScrolled autocommand event is not enough.
Solution: Add WinResized and provide information about what changed.
(closes #11576)
|
|
Problem: With 'smoothscroll' set mouse click position may be wrong.
Solution: Adjust computations for w_skipcol. (Yee Cheng Chin, closes #11514)
|
|
Problem: Mouse scroll code is not optimal.
Solution: Properly organise Normal mode, Insert mode and common code.
(Christopher Plewright, closes #11572)
|
|
Problem: Some mouse scroll code is not in a good place.
Solution: Refactor the code. (Christopher Plewright, closes #11561)
|
|
Problem: Setting w_leftcol and handling side effects is confusing.
Solution: Use a function to set w_leftcol() and handle side effects.
|
|
Problem: Horizontal mouse scroll only works in the GUI.
Solution: Make horizontal mouse scroll also work in a terminal.
(Christopher Plewright, closes #11448)
|
|
Problem: Cannot drag an entry in the tabpage line.
Solution: Clear dragwin instead of got_click. (closes #11483,
closes #11482)
|
|
Problem: Crash when dragging the statusline with a mapping.
Solution: Check for valid window pointer. (issue #11427)
|
|
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)
|
|
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)
|
|
Problem: Crash with mouse click when not initialized.
Solution: Check TabPageIdxs[] is not NULL.
|
|
Problem: Redraw flags are not named specifically.
Solution: Prefix "UPD_" to the flags, for UPDate_screen().
|
|
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)
|
|
Problem: After CTRL-Left-mouse click a mouse scroll also has CTRL.
Solution: Reset orig_mouse_code also for wheel events. (closes #10840)
|
|
Problem: Cannot show virtual text.
Solution: Initial changes for virtual text support, using text properties.
|
|
Problem: Cursor in wrong column with mouse click after concealed text.
Solution: Store the text column when drawing text.
|
|
Problem: 'fillchars' cannot have window-local values.
Solution: Make 'fillchars' global-local. (closes #5206)
|
|
Problem: Some callers of rettv_list_alloc() check for not OK. (Christ van
Willegen)
Solution: Use "==" instead of "!=" when checking the return value.
|
|
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.
|
|
Problem: Dragging statusline fails for window with winbar.
Solution: Fix off-by-one error. (closes #10448)
|
|
Problem: Various white space and cosmetic mistakes.
Solution: Change spaces to tabs, improve comments.
|
|
Problem: The mode #defines are not clearly named.
Solution: Prepend MODE_. Renumber them to put the mapped modes first.
|
|
Problem: Mouse wheel scrolling is inconsistent.
Solution: Use the MS-Winows system setting. (closes #10368)
|
|
Problem: WinScrolled not always triggered when scrolling with the mouse.
Solution: Add calls to may_trigger_winscrolled(). (closes #10246)
|
|
Problem: No test for what 8.2.4691 fixes.
Solution: Add a test. Use a more generic sotlution. (closes #10090)
|
|
Problem: The Athena GUI support is outdated.
Solution: Remove the Athena GUI code.
|
|
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)
|
|
Problem: Build failure with some combination of features. (John Marriott)
Solution: Adjust #ifdef.
|
|
Problem: getmousepos() returns the screen column. (Ernie Rael)
Solution: Return the text column, as documented.
|
|
Problem: getmousepos() returns the wrong column. (Ernie Rael)
Solution: Limit to the text size, not the number of bytes.
|
|
Problem: Cannot drag a popup without a border.
Solution: Add the "dragall" option. (closes #9218)
|
|
Problem: Cannot drag popup window after click on a status line. (Sergey
Vlasov)
Solution: Reset on_status_line. (closes #9221)
|
|
Problem: Select mode test fails.
Solution: Do not always reset the held mouse button.
|
|
Problem: When a popup is visible a mouse move my restart Visual mode.
Solution: Reset held_button when ending Visual mode. (closes #8318)
|
|
Problem: Cannot change the characters displayed in the foldcolumn.
Solution: Add fields to 'fillchars'. (Yegappan Lakshmanan, Matthieu Coudron,
closes #7860)
|
|
Problem: Insufficient test coverage for the Netbeans interface.
Solution: Add more tests. Fix an uncovered bug. (Yegappan Lakshmanan,
closes #7240)
|
|
Problem: Vim9: :put ={expr} does not work inside :def function.
Solution: Add ISN_PUT. (closes #6397)
|