summaryrefslogtreecommitdiffstats
path: root/src/ex_cmds2.c
AgeCommit message (Collapse)Author
2024-04-05patch 9.1.0267: File name entered in GUI dialog is ignoredv9.1.0267zeertzjq
Problem: File name entered in GUI dialog is ignored (after v9.1.0265) Solution: Only set file name to "Untitled" if GUI dialog didn't set it. (zeertzjq) closes: #14417 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-04patch 9.1.0265: console dialog cannot save unnamed buffersv9.1.0265glepnir
Problem: console dialog cannot save unnamed buffers Solution: set bufname before save (glepnir). Define dialog_con_gui to test for GUI+Console dialog support, use it to skip the test when the GUI feature has been defined. Note: The dialog_changed() function will also try to call the browse_save_fname() function, when FEAT_BROWSE is defined (which is only defined in a GUI build of Vim). This will eventually lead to a call of do_browse(), which causes an error message if a GUI is not currently running (see the TODO: in do_browse()) and will then lead to a failure in Test_goto_buf_with_onfirm(). Therefore, we must disable the Test_goto_buf_with_onfirm(), when the dialog_con_gui feature is enabled (which basically means dialog feature for GUI and Console builds, in contrast to the dialog_con and dialog_gui feature). (Previously this wasn't a problem, because the test aborted in the YES case for the :confirm :b XgotoConf case and did therefore not run into the browse function call) closes: #14398 Signed-off-by: glepnir <glephunter@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-07patch 9.1.0156: Make 'wfb' failing to split still report E1513v9.1.0156Sean Dewar
Problem: may not be clear why failing to split causes an ":Xdo" command to abort if 'wfb' is set. Solution: do not return immediately if win_split fails, so E1513 is still given. Expect both errors in the test. Also fix tests to pass CI. (Sean Dewar) closes: #14152 Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-06patch 9.1.0152: Coverity complains about ignoring return valuev9.1.0152Christian Brabandt
Problem: Coverity complains about ignoring return value of win_split() (after v9.1.150) Solution: Check if win_split() failed, add winfixbuf.res to Makefile
2024-03-05patch 9.1.0150: Several minor 'winfixbuf' issuesv9.1.0150Sean Dewar
Problem: several minor 'winfixbuf' issues exist, mostly relating to the quickfix list Solution: address them and adjust tests. Retab and reflow a few things too. (Sean Dewar) Things touched include: - Replace the semsgs with gettext'd emsgs. - Handle window switching in ex_listdo properly, so curbuf and curwin are kept in-sync and trigger autocommands; handle those properly. - Don't change the list entry index in qf_jump_edit_buffer if we fail due to 'wfb' (achieved by returning FAIL; QF_ABORT should only be used if the list was changed). - Make qf_jump_edit_buffer actually switch to prevwin when using `:cXX` commands **outside** of the list window if 'wfb' is set in curwin. Handle autocommands properly in case they mess with the list. NOTE: previously, it seemed to split if 'wfb' was set, but do nothing and fail if prevwin is *valid*. This behaviour seemed strange, and maybe unintentional? Now it aligns more with what's described for the `:cXX` commands in the original PR description when used outside a list window, I think. - In both functions, only consider prevwin if 'wfb' isn't set for it; fallback to splitting otherwise. - Use win_split to split. Not sure if there was a specific reason for using ex_splitview. win_split is simpler and respects modifiers like :vertical that may have been used. Plus, its return value can be checked for setting opened_window in qf code (technically win_split_ins autocmds could immediately close it or change windows, in which the qf code might close some other window on failure; it's already the case elsewhere, though). closes: #14142 Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-03patch 9.1.0147: Cannot keep a buffer focused in a windowv9.1.0147Colin Kennedy
Problem: Cannot keep a buffer focused in a window (Amit Levy) Solution: Add the 'winfixbuf' window-local option (Colin Kennedy) fixes: #6445 closes: #13903 Signed-off-by: Colin Kennedy <colinvfx@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-19patch 9.0.2180: POSIX function name in exarg causes issuesv9.0.2180Zoltan Arpadffy
Problem: POSIX function name in exarg struct causes issues on OpenVMS Solution: Rename getline member in exarg struct to ea_getline, remove isinf() workaround for VMS There are compilers that do not treat well POSIX functions - like getline - usage in the structs. Older VMS compilers could digest this... but the newer OpenVMS compilers ( like VSI C x86-64 X7.4-843 (GEM 50XB9) ) cannot deal with these structs. This could be limited to getline() that is defined via getdelim() and might not affect all POSIX functions in general - but avoiding POSIX function names usage in the structs is a "safe side" practice without compromising the functionality or the code readability. The previous OpenVMS X86 port used a workaround limiting the compiler capabilities using __CRTL_VER_OVERRIDE=80400000 In order to make the OpenVMS port future proof, this pull request proposes a possible solution. closes: #13704 Signed-off-by: Zoltan Arpadffy <zoltan.arpadffy@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-05-09patch 9.0.1529: code style test doesn't check for space after "if"v9.0.1529Bram Moolenaar
Problem: Code style test doesn't check for space after "if". Solution: Add a test for space.
2023-01-09patch 9.0.1166: code is indented more than necessaryv9.0.1166Yegappan Lakshmanan
Problem: Code is indented more than necessary. Solution: Use an early return where it makes sense. (Yegappan Lakshmanan, closes #11792)
2022-12-30patch 9.0.1115: code is indented more than neededv9.0.1115Yegappan Lakshmanan
Problem: Code is indented more than needed. Solution: Use an early return to reduce indenting. (Yegappan Lakshmanan, closes #11758)
2022-12-16patch 9.0.1064: code for making 'shortmess' temporarily empty is repeatedv9.0.1064Christian Brabandt
Problem: Code for making 'shortmess' temporarily empty is repeated. Solution: Add functions for making 'shortmess' empty and restoring it. (Christian Brabandt, closes #11709)
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-10-09patch 9.0.0708: :confirm does not work properly for a terminal bufferv9.0.0708Yee Cheng Chin
Problem: :confirm does not work properly for a terminal buffer. Solution: Handle :confirm for a terminal buffer differently. (Yee Cheng Chin, closes #11312)
2022-08-29patch 9.0.0318: clearing screen causes flickerv9.0.0318Bram Moolenaar
Problem: Clearing screen causes flicker. Solution: Do not clear but redraw in more cases. Add () to "wait_return".
2022-08-25patch 9.0.0263: too many #ifdefsv9.0.0263Bram Moolenaar
Problem: Too many #ifdefs. Solution: Make some functions always available.
2022-04-15patch 8.2.4753: error from setting an option is silently ignoredv8.2.4753Bram Moolenaar
Problem: Error from setting an option is silently ignored. Solution: Handle option value errors better. Fix uses of N_().
2022-01-05patch 8.2.4012: error messages are spread outv8.2.4012Bram Moolenaar
Problem: Error messages are spread out. Solution: Move the last error messages to errors.h.
2022-01-04patch 8.2.4005: error messages are spread outv8.2.4005Bram Moolenaar
Problem: Error messages are spread out. Solution: Move more error messages to errors.h.
2021-12-31patch 8.2.3957: error messages are spread outv8.2.3957Bram Moolenaar
Problem: Error messages are spread out. Solution: Move more errors to errors.h.
2021-11-12patch 8.2.3584: "verbose set efm" reports location of the :compiler commandv8.2.3584Bram Moolenaar
Problem: "verbose set efm" reports the location of the :compiler command. (Gary Johnson) Solution: Add the "-keepscript" argument to :command and use it when defining CompilerSet.
2021-07-20patch 8.2.3190: error messages are spread outv8.2.3190Bram Moolenaar
Problem: Error messages are spread out. Solution: Move error messages to errors.h and give them a clear name.
2020-10-24patch 8.2.1898: command modifier parsing always uses global cmdmodv8.2.1898Bram Moolenaar
Problem: Command modifier parsing always uses global cmdmod. Solution: Pass in cmdmod_T to use. Rename struct fields consistently.
2020-07-22patch 8.2.1269: language and locale code spread outv8.2.1269Bram Moolenaar
Problem: Language and locale code spread out. Solution: Move relevant code to src/locale.c. (Yegappan Lakshmanan, closes #6509)
2020-06-16patch 8.2.0988: getting directory contents is always case sortedv8.2.0988Bram Moolenaar
Problem: Getting directory contents is always case sorted. Solution: Add sort options and v:collate. (Christian Brabandt, closes #6229)
2020-06-12patch 8.2.0961: MS-Windows: no completion for localesv8.2.0961Bram Moolenaar
Problem: MS-Windows: no completion for locales. Solution: Use the directories in $VIMRUNTIME/lang to complete locales. (Christian Brabandt, closes 36248)
2020-05-28patch 8.2.0836: not all :cdo output is visiblev8.2.0836Bram Moolenaar
Problem: Not all :cdo output is visible. Solution: Reset 'shortmess' temporarily. (Yegappan Lakshmanan, closes #6155)
2020-04-12patch 8.2.0559: clearing a struct is verbosev8.2.0559Bram Moolenaar
Problem: Clearing a struct is verbose. Solution: Define and use CLEAR_FIELD() and CLEAR_POINTER().
2020-04-02patch 8.2.0500: using the same loop in many placesv8.2.0500Bram Moolenaar
Problem: Using the same loop in many places. Solution: Define more FOR_ALL macros. (Yegappan Lakshmanan, closes #5339)
2020-02-14patch 8.2.0256: time and timer related code is spread outv8.2.0256Bram Moolenaar
Problem: Time and timer related code is spread out. Solution: Move time and timer related code to a new file. (Yegappan Lakshmanan, closes #5604)
2019-12-23patch 8.2.0035: saving and restoring called_emsg is clumsyv8.2.0035Bram Moolenaar
Problem: Saving and restoring called_emsg is clumsy. Solution: Count the number of error messages.
2019-12-01patch 8.1.2379: using old C style commentsv8.1.2379Bram Moolenaar
Problem: Using old C style comments. Solution: Use // comments where appropriate.
2019-09-10patch 8.1.2021: some global functions can be local to the filev8.1.2021Bram Moolenaar
Problem: Some global functions can be local to the file. Solution: Add "static". (Yegappan Lakshmanan, closes #4917)
2019-09-05patch 8.1.1989: the evalfunc.c file is still too bigv8.1.1989Bram Moolenaar
Problem: The evalfunc.c file is still too big. Solution: Move f_pathshorten() to filepath.c. Move f_cscope_connection() to if_cscope.c. Move diff_ functions to diff.c. Move timer_ functions to ex_cmds2.c. move callback functions to evalvars.c.
2019-08-25patch 8.1.1927: code for dealing with script files is spread outv8.1.1927Bram Moolenaar
Problem: Code for dealing with script files is spread out. Solution: Move the code to scriptfile.c. (Yegappan Lakshmanan, closes #4861)
2019-08-18patch 8.1.1887: the +cmdline_compl feature is not in the tiny versionv8.1.1887Bram Moolenaar
Problem: The +cmdline_compl feature is not in the tiny version. Solution: Graduate the +cmdline_compl feature.
2019-08-17patch 8.1.1869: code for the argument list is spread outv8.1.1869Bram Moolenaar
Problem: Code for the argument list is spread out. Solution: Put argument list code in arglist.c. (Yegappan Lakshmanan, closes #4819)
2019-08-03patch 8.1.1800: function call functions have too many argumentsv8.1.1800Bram Moolenaar
Problem: Function call functions have too many arguments. Solution: Pass values in a funcexe_T struct.
2019-08-03patch 8.1.1795: no syntax HL after splitting windows with :bufdov8.1.1795Bram Moolenaar
Problem: No syntax HL after splitting windows with :bufdo. (Yasuhiro Matsumoto) Solution: Trigger Syntax autocommands in buffers that are active. (closes #4761)
2019-07-14patch 8.1.1689: profiling code is spread outv8.1.1689Bram Moolenaar
Problem: Profiling code is spread out. Solution: Move more profiling code to profiler.c. (Yegappan Lakshmanan, closes #4668)
2019-07-13patch 8.1.1684: profiling functionality is spread outv8.1.1684Bram Moolenaar
Problem: Profiling functionality is spread out. Solution: Put profiling functionality in profiling.c. (Yegappan Lakshmanan, closes #4666)
2019-07-04patch 8.1.1625: script line numbers are not exactly rightv8.1.1625Bram Moolenaar
Problem: Script line numbers are not exactly right. Solution: Handle heredoc and continuation lines better. (Ozaki Kiichi, closes #4611, closes #4511)
2019-06-25patch 8.1.1591: on error garbage collection may free memory in usev8.1.1591Bram Moolenaar
Problem: On error garbage collection may free memory in use. Solution: Reset may_garbage_collect when evaluating expression mapping. Add tests. (Ozaki Kiichi, closes #4579)
2019-06-25patch 8.1.1588: in :let-heredoc line continuation is recognizedv8.1.1588Bram Moolenaar
Problem: In :let-heredoc line continuation is recognized. Solution: Do not consume line continuation. (Ozaki Kiichi, closes #4580)
2019-06-20patch 8.1.1575: callbacks may be garbage collectedv8.1.1575Bram Moolenaar
Problem: Callbacks may be garbage collected. Solution: Set reference in callbacks. (Ozaki Kiichi, closes #4564)
2019-06-16patch 8.1.1555: NOT_IN_POPUP_WINDOW is confusingv8.1.1555Bram Moolenaar
Problem: NOT_IN_POPUP_WINDOW is confusing. (Andy Massimino) Solution: Rename to ERROR_IF_POPUP_WINDOW().
2019-06-08patch 8.1.1498: ":write" increments b:changedtick even though nothing changedv8.1.1498Bram Moolenaar
Problem: ":write" increments b:changedtick even though nothing changed. (Daniel Hahler) Solution: Only increment b:changedtick if the modified flag is reset.
2019-06-01patch 8.1.1438: some commands cause trouble in a popup windowv8.1.1438Bram Moolenaar
Problem: Some commands cause trouble in a popup window. Solution: Add NOT_IN_POPUP_WINDOW.
2019-06-01patch 8.1.1437: code to handle callbacks is duplicatedv8.1.1437Bram Moolenaar
Problem: Code to handle callbacks is duplicated. Solution: Add callback_T and functions to deal with it.
2019-05-28patch 8.1.1414: alloc() returning "char_u *" causes a lot of type castsv8.1.1414Bram Moolenaar
Problem: Alloc() returning "char_u *" causes a lot of type casts. Solution: Have it return "void *". (Mike Williams) Define ALLOC_ONE() to check the simple allocations.
2019-05-25patch 8.1.1393: unnecessary type castsv8.1.1393Bram Moolenaar
Problem: Unnecessary type casts. Solution: Remove type casts from alloc() and lalloc() calls. (Mike Williams)