summaryrefslogtreecommitdiffstats
path: root/src/globals.h
AgeCommit message (Collapse)Author
2024-05-03patch 9.1.0391: Vim9: could improve testingv9.1.0391Yegappan Lakshmanan
Problem: Vim9: could improve testing (Ernie Rael) Solution: Support defcompile for test_override() to improve testing (Yegappan Lakshmanan) fixes: #14553 closes: #14712 Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-18patch 9.1.0349: Vim9: need static type for typealiasv9.1.0349Yegappan Lakshmanan
Problem: Vim9: need static type for typealias Solution: Refactor the typval2type() function and add a static type for typealias (Yegappan Lakshmanan) closes: #14582 Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-31patch 9.1.0231: Filetype may be undetected when SwapExists sets ft in other bufv9.1.0231zeertzjq
Problem: Filetype may be undetected when a SwapExists autocommand sets filetype in another buffer. Solution: Make filetype detection state buffer-specific. Also fix a similar problem for 'modified' (zeertzjq). closes: #14344 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-12patch 9.1.0170: Re-allow curwin == prevwin, but document it insteadv9.1.0170Sean Dewar
Problem: more places exist where curwin == prevwin, and it may even be expected in some cases. Solution: revert v9.1.0001, but document that it's possible instead. (Sean Dewar) I've had a change of heart for the following reasons: - A quick 'n dirty [GitHub code search](https://github.com/search?q=%2F%28winnr%5C%28%5C%29%5Cs*%3D%3D%5Cs*winnr%5C%28%5B%27%22%5D%23%5B%27%22%5D%5C%29%7Cwinnr%5C%28%5B%27%22%5D%23%5B%27%22%5D%5C%29%5Cs*%3D%3D%5Cs*winnr%5C%28%5C%29%29%2F&type=code) reveals some cases where it's expected in the wild. Particularly, it made me aware `winnr() == winnr('#')` is possible when curwin is changed temporarily during the evaluation of a &statusline expression item (`%{...}`), and is used to show something different on the statusline belonging to the previous window; that behaviour wasn't changed in v9.1.0001, but it means curwin == prevwin makes sense in some cases. - The definition and call sites of back_to_prevwin imply some expectation that prevwin == wp (== curwin) is possible, as it's used to skip entering the prevwin in that case. - Prior to v9.1.0001, `:wincmd p` would not beep in the case that was patched in v9.1.0001, but now does. That resulted in #14047 being opened, as it affected the CtrlP plugin. I find it odd that `:wincmd p` had cases where it wouldn't beep despite doing nothing, but it may be preferable to keep things that way (or instead also beep if curwin == prevwin, if that's preferred). - After more digging, I found cases in win_free_mem, enter_tabpage, aucmd_restbuf and qf_open_new_cwindow where curwin == prevwin is possible (many of them from autocommands). Others probably exist too, especially in places where curwin is changed temporarily. fixes: #14047 closes: #14186 Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.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.2178: reg_executing() wrong for :normal with rangev9.0.2178zeertzjq
Problem: reg_executing() returns wrong result in :normal with range when 'showcmd' is set (after 8.2.4705). Solution: Reset "pending_end_reg_executing" when executing a register. closes: #13707 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-16patch 9.0.2168: Moving tabpages on :drop may cause an endless loopv9.0.2168Christian Brabandt
Problem: Moving tabpages on :drop may cause an endless loop Solution: Disallow moving tabpages on :drop when cleaning up the arglist first Moving tabpages during drop command may cause an endless loop When executing a :tab drop command, Vim will close all windows not in the argument list. This triggers various autocommands. If a user has created an 'au Tabenter * :tabmove -' autocommand, this can cause Vim to end up in an endless loop, when trying to iterate over all tabs (which would trigger the tabmove autocommand, which will change the tpnext pointer, etc). So instead of blocking all autocommands before we actually try to edit the given file, lets simply disallow to move tabpages around. Otherwise, we may change the expected number of events triggered during a :drop command, which users may rely on (there is actually a test, that expects various TabLeave/TabEnter autocommands) and would therefore be a backwards incompatible change. Don't make this an error, as this could trigger several times during the drop command, but silently ignore the :tabmove command in this case (and it should in fact finally trigger successfully when loading the given file in a new tab). So let's just be quiet here instead. fixes: #13676 closes: #13686 Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-04patch 9.0.1982: vim9: clean up from v9.0.1955v9.0.1982Ernie Rael
Problem: vim9: clean up from v9.0.1955 Solution: Fix a few remaining issues, improve error message - Use `cl_exec`, the executing class, to check permissions in `get_lval()`. - Handle lockvar of script variable from class. - Add 'in class "Xxx"' to e_cannot_access_private_variable_str. closes: #13222 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Ernie Rael <errael@raelity.com>
2023-09-29patch 9.0.1955: Vim9: lockvar issues with objects/classesv9.0.1955Ernie Rael
Problem: Vim9: lockvar issues with objects/classes Solution: fix `get_lhs()` object/class access and avoid `SEGV`, make error messages more accurate. - `get_lval()` detects/returns object/class access - `compile_lock_unlock()` generate code for bare static and obj_arg access - `do_lock_var()` check lval for `ll_object`/`ll_class` and fail if so. Details: - Add `ll_object`/`ll_class`/`ll_oi` to `lval_T`. - Add `lockunlock_T` to `isn_T` for `is_arg` to specify handling of `lval_root` in `get_lval()`. - In `get_lval()`, fill in `ll_object`/`ll_class`/`ll_oi` as needed; when no `[idx] or .key`, check lval_root on the way out. - In `do_lock_var()` check for `ll_object`/`ll_class`; also bullet proof ll_dict case and give `Dictionay required` if problem. (not needed to avoid lockvar crash anymore) - In `compile_lock_unlock()` compile for the class variable and func arg cases. closes: #13174 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Ernie Rael <errael@raelity.com>
2023-08-23patch 9.0.1786: Vim9: need instanceof() functionv9.0.1786LemonBoy
Problem: Vim9: need instanceof() function Solution: Implement instanceof() builtin Implemented in the same form as Python's isinstance because it allows for checking multiple class types at the same time. closes: #12867 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: LemonBoy <thatlemon@gmail.com>
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-08-13patch 9.0.1704: Cannot use positional arguments for printf()v9.0.1704Christ van Willegen
Problem: Cannot use positional arguments for printf() Solution: Support positional arguments in string formatting closes: #12140 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Christ van Willegen <cvwillegen@gmail.com>
2023-05-14patch 9.0.1557: test failures for unreachable codev9.0.1557Bram Moolenaar
Problem: Test failures for unreachable code. Solution: Add a test override to ignore unreachable code.
2023-03-07patch 9.0.1390: FOR_ALL_ macros are defined in an unexpected filev9.0.1390Yegappan Lakshmanan
Problem: FOR_ALL_ macros are defined in an unexpected file. Solution: Move FOR_ALL_ macros to macros.h. Add FOR_ALL_HASHTAB_ITEMS. (Yegappan Lakshmanan, closes #12109)
2023-02-21patch 9.0.1334: using tt_member for the class leads to mistakesv9.0.1334Bram Moolenaar
Problem: Using tt_member for the class leads to mistakes. Solution: Add a separate tt_class field.
2023-01-20patch 9.0.1224: cannot call a :def function with a number for float argumentv9.0.1224Bram Moolenaar
Problem: Cannot call a :def function with a number for a float argument. Solution: Accept a number as well, convert it to a float.
2023-01-14patch 9.0.1195: restoring KeyTyped when building statusline not testedv9.0.1195zeertzjq
Problem: Restoring KeyTyped when building statusline not tested. Solution: Add a test. Clean up and fix other tests. (closes #11815)
2023-01-11patch 9.0.1178: a child class cannot override functions from a base classv9.0.1178Bram Moolenaar
Problem: A child class cannot override functions from a base class. Solution: Allow overriding and implement "super".
2022-12-26patch 9.0.1101: unused global variablev9.0.1101Bram Moolenaar
Problem: Unused global variable. Solution: Remove the variable. (closes #11752)
2022-12-16patch 9.0.1065: a shell command switching screens may still have a problemv9.0.1065Bram Moolenaar
Problem: A shell command switching screens may still have a problem with the kitty keyboard protocol. Solution: Disable the kitty keyboard protocol both in the current and the alternate screen, if there are indications it might be needed. (issue #11705) Also fix naming.
2022-12-15patch 9.0.1061: cannot display 'showcmd' somewhere elsev9.0.1061Luuk van Baal
Problem: Cannot display 'showcmd' somewhere else. Solution: Add the 'showcmdloc' option. (Luuk van Baal, closes #11684)
2022-12-09patch 9.0.1039: using a <Cmd> mapping CmdlineChanged may be triggered twicev9.0.1039Bram Moolenaar
Problem: Using a <Cmd> mapping CmdlineChanged may be triggered twice. Solution: Count the number of times CmdlineChanged is triggered and avoid doing it twice. (closes #116820
2022-11-30patch 9.0.0978: build errors without the +channel featurev9.0.0978Bram Moolenaar
Problem: Build errors without the +channel feature. (John Marriott) Solution: Adjust #ifdefs.
2022-11-30patch 9.0.0977: it is not easy to see what client-server commands are doingv9.0.0977Bram Moolenaar
Problem: It is not easy to see what client-server commands are doing. Solution: Add channel log messages if ch_log() is available. Move the channel logging and make it available with the +eval feature.
2022-11-28patch 9.0.0967: leaking memory from autocmd windowsv9.0.0967Bram Moolenaar
Problem: Leaking memory from autocmd windows. Solution: Free window when auc_win is not NULL.
2022-11-28patch 9.0.0965: using one window for executing autocommands is insufficientv9.0.0965Bram Moolenaar
Problem: Using one window for executing autocommands is insufficient. Solution: Use up to five windows for executing autocommands.
2022-11-26patch 9.0.0954: cannot detect whether modifyOtherKeys is enabledv9.0.0954Bram Moolenaar
Problem: Cannot detect whether modifyOtherKeys is enabled. Solution: Use XTQMODKEYS introduced by xterm version 377 to request the modifyOtherKeys level. Update the keycode check results.
2022-11-23patch 9.0.0930: cannot debug the Kitty keyboard protocol with TermDebugv9.0.0930Bram Moolenaar
Problem: Cannot debug the Kitty keyboard protocol with TermDebug. Solution: Add Kitty keyboard protocol support to the libvterm fork. Recognize the escape sequences that the protocol generates. Add the 'keyprotocol' option to allow the user to specify for which terminal what protocol is to be used, instead of hard-coding this. Add recognizing the kitty keyboard protocol status.
2022-10-13patch 9.0.0740: prop_add_list() gives multiple errors for invalid argumentv9.0.0740Bram Moolenaar
Problem: prop_add_list() gives multiple errors for invalid argument. Solution: Only give one error message.
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-10-03patch 9.0.0647: the 'splitscroll' option is not a good namev9.0.0647Luuk van Baal
Problem: The 'splitscroll' option is not a good name. Solution: Rename 'splitscroll' to 'splitkeep' and make it a string option, also supporting "topline". (Luuk van Baal, closes #11258)
2022-09-29patch 9.0.0623: error for modifying a const is not detected at compile timev9.0.0623Bram Moolenaar
Problem: Error for modifying a const is not detected at compile time. Solution: Add TTFLAG_CONST and check for it in add() and extend().
2022-09-19patch 9.0.0505: various problems with 'nosplitscroll'v9.0.0505Luuk van Baal
Problem: Various problems with 'nosplitscroll'. Solution: Fix 'nosplitscroll' problems. (Luuk van Baal, closes #11166)
2022-09-15patch 9.0.0469: cursor moves if cmdwin is closed when 'splitscroll' is offv9.0.0469Luuk van Baal
Problem: Cursor moves if cmdwin is closed when 'splitscroll' is off. Solution: Skip win_fix_cursor if called when cmdwin is open or closing. (Luuk van Baal, closes #11134)
2022-09-14patch 9.0.0464: with virtual text "above" indenting doesn't work wellv9.0.0464Bram Moolenaar
Problem: With virtual text "above" indenting doesn't work well. Solution: Ignore text properties while adjusting indent. (issue #11084)
2022-08-31patch 9.0.0340: the 'cmdheight' zero support causes too much troublev9.0.0340Bram Moolenaar
Problem: The 'cmdheight' zero support causes too much trouble. Solution: Revert support for 'cmdheight' being zero.
2022-08-29patch 9.0.0321: cannot use the message popup window directlyv9.0.0321Bram Moolenaar
Problem: Cannot use the message popup window directly. Solution: Add ":echowindow".
2022-08-26patch 9.0.0279: the tiny version has the popup menu but not 'wildmenu'v9.0.0279Bram Moolenaar
Problem: The tiny version has the popup menu but not 'wildmenu'. Solution: Graduate the wildmenu feature.
2022-08-25patch 9.0.0268: build error without the +eval featurev9.0.0268Bram Moolenaar
Problem: Build error without the +eval feature. Solution: Remove #ifdef.
2022-08-22patch 9.0.0245: mechanism to prevent recursive screen updating is incompletev9.0.0245Bram Moolenaar
Problem: Mechanism to prevent recursive screen updating is incomplete. Solution: Add "redraw_not_allowed" and set it in build_stl_str_hl(). (issue #10952)
2022-08-21patch 9.0.0234: cannot make difference between :normal end and argument charv9.0.0234Bram Moolenaar
Problem: Cannot make difference between the end of :normal and a character in its argument. Solution: Add the "typebuf_was_empty" flag. (closes #10950)
2022-08-16patch 9.0.0220: invalid memory access with for loop over NULL stringv9.0.0220Bram Moolenaar
Problem: Invalid memory access with for loop over NULL string. Solution: Make sure mb_ptr2len() consistently returns zero for NUL.
2022-07-31patch 9.0.0118: no test for what patch 9.0.0155 fixesv9.0.0118zeertzjq
Problem: No test for what patch 9.0.0155 fixes. Solution: Add a test. Fix typos. (closes #10822)
2022-07-30patch 9.0.0115: when 'cmdheight' is zero pressing ':' may scroll a windowv9.0.0115Bram Moolenaar
Problem: When 'cmdheight' is zero pressing ':' may scroll a window. Solution: Add the made_cmdheight_nonzero flag and set 'scrolloff' to zero.
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-30patch 9.0.0013: reproducing memory access errors can be difficultv9.0.0013Bram Moolenaar
Problem: Reproducing memory access errors can be difficult. Solution: When testing, copy each line to allocated memory, so that valgrind can detect accessing memory before and/or after it. Fix uncovered problems.
2022-06-19patch 8.2.5128: syntax disabled when using synID() in searchpair() skip exprv8.2.5128Bram Moolenaar
Problem: Syntax highlighting disabled when using synID() in searchpair() skip expression and it times out. (Jaehwang Jung) Solution: Add the redrawtime_limit_set flag. (closes #10562)
2022-06-14patch 8.2.5088: value of cmod_verbose is a bit complicated to usev8.2.5088zeertzjq
Problem: Value of cmod_verbose is a bit complicated to use. Solution: Use zero for not set, value + 1 when set. (closes #10564)
2022-05-31patch 8.2.5047: CurSearch highlight is often wrongv8.2.5047Bram Moolenaar
Problem: CurSearch highlight is often wrong. Solution: Remember the last highlighted position and redraw when needed.