Age | Commit message (Collapse) | Author |
|
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>
|
|
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>
|
|
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>
|
|
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
|
|
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>
|
|
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>
|
|
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>
|
|
Problem: Code style test doesn't check for space after "if".
Solution: Add a test for space.
|
|
Problem: Code is indented more than necessary.
Solution: Use an early return where it makes sense. (Yegappan Lakshmanan,
closes #11792)
|
|
Problem: Code is indented more than needed.
Solution: Use an early return to reduce indenting. (Yegappan Lakshmanan,
closes #11758)
|
|
Problem: Code for making 'shortmess' temporarily empty is repeated.
Solution: Add functions for making 'shortmess' empty and restoring it.
(Christian Brabandt, closes #11709)
|
|
Problem: Using one window for executing autocommands is insufficient.
Solution: Use up to five windows for executing autocommands.
|
|
Problem: :confirm does not work properly for a terminal buffer.
Solution: Handle :confirm for a terminal buffer differently. (Yee Cheng
Chin, closes #11312)
|
|
Problem: Clearing screen causes flicker.
Solution: Do not clear but redraw in more cases. Add () to "wait_return".
|
|
Problem: Too many #ifdefs.
Solution: Make some functions always available.
|
|
Problem: Error from setting an option is silently ignored.
Solution: Handle option value errors better. Fix uses of N_().
|
|
Problem: Error messages are spread out.
Solution: Move the last error messages to errors.h.
|
|
Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
|
|
Problem: Error messages are spread out.
Solution: Move more errors to errors.h.
|
|
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.
|
|
Problem: Error messages are spread out.
Solution: Move error messages to errors.h and give them a clear name.
|
|
Problem: Command modifier parsing always uses global cmdmod.
Solution: Pass in cmdmod_T to use. Rename struct fields consistently.
|
|
Problem: Language and locale code spread out.
Solution: Move relevant code to src/locale.c. (Yegappan Lakshmanan,
closes #6509)
|
|
Problem: Getting directory contents is always case sorted.
Solution: Add sort options and v:collate. (Christian Brabandt, closes #6229)
|
|
Problem: MS-Windows: no completion for locales.
Solution: Use the directories in $VIMRUNTIME/lang to complete locales.
(Christian Brabandt, closes 36248)
|
|
Problem: Not all :cdo output is visible.
Solution: Reset 'shortmess' temporarily. (Yegappan Lakshmanan, closes #6155)
|
|
Problem: Clearing a struct is verbose.
Solution: Define and use CLEAR_FIELD() and CLEAR_POINTER().
|
|
Problem: Using the same loop in many places.
Solution: Define more FOR_ALL macros. (Yegappan Lakshmanan, closes #5339)
|
|
Problem: Time and timer related code is spread out.
Solution: Move time and timer related code to a new file. (Yegappan
Lakshmanan, closes #5604)
|
|
Problem: Saving and restoring called_emsg is clumsy.
Solution: Count the number of error messages.
|
|
Problem: Using old C style comments.
Solution: Use // comments where appropriate.
|
|
Problem: Some global functions can be local to the file.
Solution: Add "static". (Yegappan Lakshmanan, closes #4917)
|
|
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.
|
|
Problem: Code for dealing with script files is spread out.
Solution: Move the code to scriptfile.c. (Yegappan Lakshmanan, closes #4861)
|
|
Problem: The +cmdline_compl feature is not in the tiny version.
Solution: Graduate the +cmdline_compl feature.
|
|
Problem: Code for the argument list is spread out.
Solution: Put argument list code in arglist.c. (Yegappan Lakshmanan,
closes #4819)
|
|
Problem: Function call functions have too many arguments.
Solution: Pass values in a funcexe_T struct.
|
|
Problem: No syntax HL after splitting windows with :bufdo. (Yasuhiro
Matsumoto)
Solution: Trigger Syntax autocommands in buffers that are active.
(closes #4761)
|
|
Problem: Profiling code is spread out.
Solution: Move more profiling code to profiler.c. (Yegappan Lakshmanan,
closes #4668)
|
|
Problem: Profiling functionality is spread out.
Solution: Put profiling functionality in profiling.c. (Yegappan Lakshmanan,
closes #4666)
|
|
Problem: Script line numbers are not exactly right.
Solution: Handle heredoc and continuation lines better. (Ozaki Kiichi,
closes #4611, closes #4511)
|
|
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)
|
|
Problem: In :let-heredoc line continuation is recognized.
Solution: Do not consume line continuation. (Ozaki Kiichi, closes #4580)
|
|
Problem: Callbacks may be garbage collected.
Solution: Set reference in callbacks. (Ozaki Kiichi, closes #4564)
|
|
Problem: NOT_IN_POPUP_WINDOW is confusing. (Andy Massimino)
Solution: Rename to ERROR_IF_POPUP_WINDOW().
|
|
Problem: ":write" increments b:changedtick even though nothing changed.
(Daniel Hahler)
Solution: Only increment b:changedtick if the modified flag is reset.
|
|
Problem: Some commands cause trouble in a popup window.
Solution: Add NOT_IN_POPUP_WINDOW.
|
|
Problem: Code to handle callbacks is duplicated.
Solution: Add callback_T and functions to deal with it.
|
|
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.
|
|
Problem: Unnecessary type casts.
Solution: Remove type casts from alloc() and lalloc() calls. (Mike Williams)
|