1
0
forked from aniani/vim

955 Commits

Author SHA1 Message Date
64-bitman
250739d442
patch 9.1.1213: cannot :put while keeping indent
Problem:  cannot :put while keeping indent
          (Peter Aronoff)
Solution: add the :iput ex command (64-bitman)

fixes: #16225
closes: #16886

Signed-off-by: 64-bitman <60551350+64-bitman@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-16 21:15:11 +01:00
Jim Zhou
bcf66e0141
patch 9.1.1211: TabClosedPre is triggered just before the tab is being freed
Problem:  TabClosedPre is triggered just before the tab is being freed,
          which limited its functionality.
Solution: Trigger it a bit earlier and also on :tabclose and :tabonly
          (Jim Zhou)

closes: #16890

Signed-off-by: Jim Zhou <jimzhouzzy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-16 20:24:57 +01:00
Yegappan Lakshmanan
00d3459ea6
patch 9.1.0959: Coverity complains about type conversion
Problem:  Coverity complains about type conversion
          (after v9.1.0957)
Solution: use size_t instead of int for file length
          (Yegappan Lakshmanan)

closes: #16297

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-25 10:20:51 +01:00
Yinzuo Jiang
a2a2fe841e
patch 9.1.0934: hard to view an existing buffer in the preview window
Problem:  hard to view an existing buffer in the preview window
Solution: add the :pbuffer command (Yinzuo Jiang)

Similar as `:pedit` and `:buffer` command. `:pbuffer` edits buffer [N]
from the buffer list in the preview window.

`:pbuffer` can also open special buffer, for example terminal buffer.

closes: #16222

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-16 21:22:09 +01:00
zeertzjq
6eda269600
patch 9.1.0835: :setglobal doesn't work properly for 'ffu' and 'tsrfu'
Problem:  :setglobal doesn't work properly for 'ffu' and 'tsrfu' when
          the local value is set (after v9.1.0831)
Solution: Check os_flags instead of buffer option variable (zeertzjq).

closes: #15980

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-03 09:23:33 +01:00
Yegappan Lakshmanan
a13f3a4f5d
patch 9.1.0831: 'findexpr' can't be used as lambad or Funcref
Problem:  'findexpr' can't be used for lambads
          (Justin Keyes)
Solution: Replace the findexpr option with the findfunc option
          (Yegappan Lakshmanan)

related: #15905
closes: #15976

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-02 18:43:42 +01:00
John Marriott
8d4477ef22
patch 9.1.0828: string_T struct could be used more often
Problem:  string_T struct could be used more often
Solution: Refactor code and make use of string_T struct
          for key-value pairs, reformat overlong lines
          (John Marriott)

closes: #15975

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-02 16:11:58 +01:00
zeertzjq
20e045f781
patch 9.1.0821: 'findexpr' completion doesn't set v:fname to cmdline argument
Problem:  'findexpr' completion doesn't set v:fname to cmdline argument.
Solution: Set v:fname to the cmdline argument as-is (zeertzjq).

closes: #15934

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-28 22:05:26 +01:00
Yegappan Lakshmanan
2f6efaccfd
patch 9.1.0811: :find expansion does not consider 'findexpr'
Problem:  :find expansion does not consider 'findexpr'
Solution: Support expanding :find command argument using 'findexpr'
          (Yegappan Lakshmanan)

closes: #15929

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-23 21:06:10 +02:00
Yegappan Lakshmanan
aeb1c97db5
patch 9.1.0810: cannot easily adjust the |:find| command
Problem:  cannot easily adjust the |:find| command
Solution: Add support for the 'findexpr' option (Yegappan Lakshmanan)

closes: #15901
closes: #15905

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-22 23:42:20 +02:00
Doug Kearns
ea84202372
patch 9.1.0748: :keep* commmands are sometimes misidentified as :k
Problem:  The :keep{alt,jumps,marks,patterns} commmands are sometimes
          misidentified as :k.
Solution: Make sure one_letter_cmd() only returns true for :k and not
          other :keep* commands (Doug Kearns).

This currently manifests as missing completion for :keep* commands and
incorrect results from fullcommand().

E.g., fullcommand("keepmarks") returns "k" rather than "keepmarks".

The correct command, however, is executed as command modifiers are
handled specially in do_one_cmd() rather than using find_ex_command().

Fix exists(':k') so that it returns 2 for a full match.

closes: #15742

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-29 17:17:41 +02:00
zeertzjq
f7b8609446
patch 9.1.0717: Unnecessary nextcmd NULL checks in parse_command_modifiers()
Problem:  Unnecessary nextcmd NULL checks in parse_command_modifiers().
Solution: Remove them (zeertzjq)

Every place parse_command_modifiers() is called, nextcmd is NULL, and
after it's set to non-NULL the function returns very soon.
Even if one day nextcmd may be non-NULL, the NULL checks may still be
wrong as the correct behavior may be overriding nextcmd.

closes: #15620

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-05 17:26:30 +02:00
zeertzjq
2432b4a753
patch 9.1.0713: Newline causes E749 in Ex mode
Problem:  Newline causes E749 in Ex mode (after 9.1.0573).
Solution: Don't execute empty command followed by a newline.

closes: #15614

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-03 22:58:30 +02:00
Christian Brabandt
70a11a6bf6
patch 9.1.0624: ex command modifiers not found
Problem:  ex command modifiers are not found
          (Ingo Karkat, after v9.1.0352)
Solution: partly revert patch v9.1.0352, ignore :{ and :}
          when expanding ex commands

The issue is, that the :keepmarks command can be abbreviated to :kee or
:keep or :keepm but not to e.g. :ke (because that would be the :exe
command :k with register e).

This basically means, we need `:kee` sorted before `:keepalt` but at the
same time `:keepmarks` sorted after the `:keepalt` command in the
cmdmod_info_tab table. Due to this, the binary search may not work
correctly, so let's revert that part of patch v9.1.0352.

fixes: #15305
closes: #15336

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-26 19:13:55 +02:00
zeertzjq
7d664bf0eb
patch 9.1.0582: Printed line doesn't overwrite colon when pressing Enter in Ex mode
Problem:  Printed line no longer overwrites colon when pressing Enter in
          Ex mode (after 9.1.0573).
Solution: Restore the behavior of pressing Enter in Ex mode.
          (zeertzjq)

closes: #15258

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-14 10:22:54 +02:00
zeertzjq
d9be94cf03
patch 9.1.0581: Various lines are indented inconsistently
Problem:  style: Various lines are indented inconsistently
Solution: Retab these lines and correct some comments.
          (zeertzjq)

closes: #15259

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-14 10:20:20 +02:00
zeertzjq
d1b5ea984d
patch 9.1.0579: Ex command is still executed after giving E1247
Problem:  Ex command is still executed after giving E1247.
Solution: Indicate the error properly and set cmd to NULL.
          (zeertzjq)

closes: #15241

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-13 19:04:10 +02:00
Mohamed Akram
8c446da349
patch 9.1.0574: ex: wrong handling of commands after bar
Problem:  ex: wrong handling of commands after bar
Solution: for :append, :insert and :change use the text after the bar
          as input for those commands. This is what POSIX requests.
          (Mohamed Akram)

See the POSIX Spec:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ex.html#tag_20_40_13_03
Section 12.c

closes: #15229

Signed-off-by: Mohamed Akram <mohd.akram@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-13 18:49:55 +02:00
Mohamed Akram
c25a7084e9
patch 9.1.0573: ex: no implicit print for single addresses
Problem:  ex: no implicit print for single addresses
Solution: explicitly print even during single addresses,
          as requested by POSIX (Mohamed Akram)

See the POSIX behaviour here:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ex.html#tag_20_40_13_03
Section 6b

closes: #15230

Signed-off-by: Mohamed Akram <mohd.akram@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-12 20:18:54 +02:00
Mohamed Akram
f3daa4525b
patch 9.1.0535: newline escape wrong in ex mode
Problem:  newline escape wrong in ex mode (Konrad Schwarz)
Solution: partly revert patch 7.3.014, remove backslash in front of a
          newline when not in prompt mode in ex line mode
          (Mohamed Akram)

This fixes newline escaping to allow passing multiple commands to
":global", multiple lines to shell commands, and ending lines in append
mode with backslashes. This should fix a POSIX/(traditional) VI
incompatiblity.

This reverts a previous incorrect attempt at patch v7.3.014 to fix
append mode which removed half of trailing backslashes which lead to,
eg. the following two commands being parsed as having a different number
of backslashes:

```
!echo foo\\\
```

```
!echo foo\\ \
```

fixes: #6135
fixes: #7244
closes: #15120

Signed-off-by: Mohamed Akram <mohd.akram@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-06 17:12:09 +02:00
LemonBoy
749ba0f6d9
patch 9.1.0529: silent! causes following try/catch to not work
Problem:  silent! causes following try/catch to not work
          (Malcolm Rowe)
Solution: consider emsg_silent in handle_did_throw() and do not abort
          evaluation flow for :silent! (LemonBoy)

The silent! flag causes the evaluation not to be aborted in case of
uncaught exceptions, adjust handle_did_throw to take this detail into
account.

Fixes the long-standing todo.txt item:
```
Problem that a previous silent ":throw" causes a following try/catch not
to work. (ZyX, 2013 Sep 28) With examples: (Malcolm Rowe, 2015 Dec 24)
Also see #8487 for an example.
```

fixes: #538
closes: #15128

Signed-off-by: LemonBoy <thatlemon@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-04 19:23:16 +02:00
Mike Williams
51024bbc1a
patch 9.1.0449: MS-Windows: Compiler warnings
Problem:  MS-Windows: Compiler warnings
Solution: Resolve size_t to int warnings

closes: #14874

A couple of warnings in ex_docmd.c have been resolved by modifying their
function argument types, followed by some changes in various function
call sites.  This also allowed removal of some casts to cope with
size_t/int conversion.

Signed-off-by: Mike Williams <mrmrdubya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-30 07:46:30 +02:00
John Marriott
8c85a2a49a
patch 9.1.0426: too many strlen() calls in search.c
Problem:  too many strlen() calls in search.c
Solution: refactor code and remove more strlen() calls,
          use explicit variable to remember strlen
          (John Marriott)

closes: #14796

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-20 19:18:26 +02:00
John Marriott
ed908f760d
patch 9.1.0352: Finding cmd modifiers and cmdline-specials is inefficient
Problem:  Finding cmd modifiers and cmdline-specials is inefficient
Solution: Use binary search to find ex command modifiers and
          cmdline-special characters and reduce the number of strlen()
          (John Marriott)

closes: #14534

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-18 22:46:56 +02:00
zeertzjq
5bf6c2117f
patch 9.1.0231: Filetype may be undetected when SwapExists sets ft in other buf
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-31 18:41:27 +02:00
Colin Kennedy
65e580bd56
patch 9.1.0208: winfixbuf does not allow to re-edit current buffer
Problem:  winfixbuf does not allow to re-edit current buffer
          (Tim Pope, after v9.1.0147)
Solution: Explicitly allow :e even when 'winfixbuf' is set,
          since it just re-loads the current buffer
          (Colin Kennedy)

fixes: #14237
closes: #14286

Signed-off-by: Colin Kennedy <colinvfx@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-26 18:29:30 +01:00
zeertzjq
076faac537
patch 9.1.0205: Cannot use modifiers before :-Ntabmove
Problem:  Cannot use modifiers before :-Ntabmove.
Solution: Check backwards from the command instead of checking from the
          start of the command line. Slightly adjust docs to make them
          more consistent (zeertzjq).

closes: #14289

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-25 16:41:06 +01:00
Colin Kennedy
2157035637
patch 9.1.0147: Cannot keep a buffer focused in a window
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>
2024-03-03 16:16:47 +01:00
Keith Thompson
184f71cc68
patch 9.1.0006: is*() and to*() function may be unsafe
Problem:  is*() and to*() function may be unsafe
Solution: Add SAFE_* macros and start using those instead
          (Keith Thompson)

Use SAFE_() macros for is*() and to*() functions

The standard is*() and to*() functions declared in <ctype.h> have
undefined behavior for negative arguments other than EOF.  If plain char
is signed, passing an unchecked value from argv for from user input
to one of these functions has undefined behavior.

Solution: Add SAFE_*() macros that cast the argument to unsigned char.

Most implementations behave sanely for negative arguments, and most
character values in practice are non-negative, but it's still best
to avoid undefined behavior.

The change from #13347 has been omitted, as this has already been
separately fixed in commit ac709e2fc0db6d31abb7da96f743c40956b60c3a
(v9.0.2054)

fixes: #13332
closes: #13347

Signed-off-by: Keith Thompson <Keith.S.Thompson@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-04 21:19:04 +01:00
Zoltan Arpadffy
6fdb628082
patch 9.0.2180: POSIX function name in exarg causes issues
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-12-19 20:53:07 +01:00
Christian Brabandt
060623e4a3
patch 9.0.2110: [security]: overflow in ex address parsing
Problem:  [security]: overflow in ex address parsing
Solution: Verify that lnum is positive, before substracting from
          LONG_MAX

[security]: overflow in ex address parsing

When parsing relative ex addresses one may unintentionally cause an
overflow (because LONG_MAX - lnum will overflow for negative addresses).

So verify that lnum is actually positive before doing the overflow
check.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-16 22:04:38 +01:00
Yee Cheng Chin
209ec90b9b
patch 9.0.2037: A few remaining cmdline completion issues with C-E/Y
Problem:  A few remaining cmdline completion issues with C-E/Y
Solution: Fix cmdline completion fuzzy/Ctrl-E/Ctrl-Y/options when not
          used at the end

Fix cmdline completion fuzzy/Ctrl-E/Ctrl-Y/options when not used at the end

A few places in the cmdline completion code only works properly when the
user hits Tab (or 'wildchar') at the end of the cmdline, even though
it's supposed to work even in the middle of the line.

For fuzzy search, `:e ++ff`, and `:set hl=`, fix completion code to make
sure to use `xp_pattern_len` instead of assuming the entire `xp_pattern`
is the search pattern (since it contains texts after the cursor).

Fix Ctrl-E / Ctrl-Y to not jump to the end when canceling/accepting a
wildmenu completion. Also, make them work even when not using
`set wildoptions+=pum` as there is no drawback to doing so.
(Related issue where this was brought up: #13331)

closes: #13362

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-10-17 10:56:25 +02:00
Yee Cheng Chin
989426be6e
patch 9.0.2025: no cmdline completion for ++opt args
Problem:  no cmdline completion for ++opt args
Solution: Add cmdline completion for :e ++opt=arg and :terminal
          [++options]

closes: #13319

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-10-14 11:46:51 +02:00
Christian Brabandt
00cb247465
patch 9.0.1876: Vim9: parsing commands with newlines wrong
Problem:  Vim9: parsing commands with newlines wrong
Solution: Accept a '\n' for parsing lists and command arguments

closes: #13015
closes: #13020

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-05 20:53:46 +02:00
Christian Brabandt
4c6fe2e2ea
patch 9.0.1846: [security] crash in fullcommand
Problem:  crash in fullcommand
Solution: Check for typeval correctly

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-02 19:30:03 +02:00
LemonBoy
90c27b2803
patch 9.0.1806: Vim9: bogus error on export
Problem:  Vim9: bogus error on export
Solution: Don't error out when the export command is not executed

closes: #12912
closes: #12930

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: LemonBoy <thatlemon@gmail.com>
2023-08-27 19:28:15 +02:00
Christian Brabandt
590aae3557 patch 9.0.1665: empty CmdlineEnter autocommand causes errors in Ex mode
Problem:    Empty CmdlineEnter autocommand causes errors in Ex mode.
Solution:   Save and restore ex_pressedreturn. (Christian Brabandt,
            closes # 12581, closes #12578)
2023-06-25 22:34:22 +01:00
RestorerZ
68ebcee023 patch 9.0.1594: some internal error messages are translated
Problem:    Some internal error messages are translated.
Solution:   Consistently do not translate internal error messages.
            (closes #12459)
2023-05-31 17:12:14 +01:00
Bram Moolenaar
097c5370ea patch 9.0.1576: users may not know what to do with an internal error
Problem:    Users may not know what to do with an internal error.
Solution:   Add a translated message with instructions.
2023-05-24 21:02:24 +01:00
Bram Moolenaar
79cdf026f1 patch 9.0.1571: RedrawingDisabled not used consistently
Problem:    RedrawingDisabled not used consistently.
Solution:   Avoid RedrawingDisabled going negative.  Set RedrawingDisabled in
            win_split_ins(). (closes #11961)
2023-05-20 14:07:00 +01:00
Bram Moolenaar
411da64e77 patch 9.0.1538: :wqall does not trigger ExitPre
Problem:    :wqall does not trigger ExitPre. (Bart Libert)
Solution:   Move preparations for :qall to a common function. (closes #12374)
2023-05-10 16:53:27 +01:00
Bram Moolenaar
70e8028a4d patch 9.0.1510: misleading variable name for error message
Problem:    Misleading variable name for error message.
Solution:   Change "name" to "number".  (closes #12345)
2023-05-05 22:58:34 +01:00
ichizok
7e5fe38efc patch 9.0.1454: code indenting is confused by macros
Problem:    Code indenting is confused by macros.
Solution:   Put semicolon after the macros instead of inside. (Ozaki Kiichi,
            closes #12257)
2023-04-15 13:17:50 +01:00
Dominique Pelle
e764d1b421 patch 9.0.1403: unused variables and functions
Problem:    Unused variables and functions.
Solution:   Delete items and adjust #ifdefs. (Dominique Pellé, closes #12145)
2023-03-12 21:20:59 +00:00
Bram Moolenaar
5145c9a829 patch 9.0.1400: find_file_in_path() is not reentrant
Problem:    find_file_in_path() is not reentrant.
Solution:   Instead of global variables pass pointers to the functions.
            (closes #12093)
2023-03-11 13:55:53 +00:00
Yegappan Lakshmanan
a23a11b5bf patch 9.0.1336: functions without arguments are not always declared properly
Problem:    Functions without arguments are not always declared properly.
Solution:   Use "(void)" instead of "()". (Yegappan Lakshmanan, closes #12031)
2023-02-21 14:27:41 +00:00
Yegappan Lakshmanan
af93691b53 patch 9.0.1330: handling new value of an option has a long "else if" chain
Problem:    Handling new value of an option has a long "else if" chain.
Solution:   Use a function pointer. (Yegappan Lakshmanan, closes #12015)
2023-02-20 12:16:39 +00:00
zeertzjq
0ef9a5c094 patch 9.0.1215: using isalpha() adds dependency on current locale
Problem:    Using isalpha() adds dependency on current locale.
Solution:   Do not use isalpha() for recognizing a URL or the end of an Ex
            command. (closes #11835)
2023-01-17 21:38:25 +00:00
Bram Moolenaar
554d031302 patch 9.0.1150: :interface is not implemented yet
Problem:    :interface is not implemented yet.
Solution:   Implement the basics of :interface.
2023-01-05 19:59:18 +00:00
Yegappan Lakshmanan
dc4daa3a39 patch 9.0.1132: code is indented more than needed
Problem:    Code is indented more than needed.
Solution:   Use an early return to reduce indentation. (Yegappan Lakshmanan,
            closes #11769)
2023-01-02 16:54:53 +00:00