1
0
Fork 0
mirror of https://github.com/vim/vim synced 2025-05-09 09:43:52 +02:00
Commit graph

243 commits

Author SHA1 Message Date
Milly
6c2fc377bf
runtime(help): Update help syntax
This commit makaes the following changes to the vim help syntax:

- fix excessive URL detection in help, because `file:{filename}` in
  doc/options.txt is determined to be a URL.
- update highlighting N for :resize in help
- split Italian-specific syntax into separate help script
- highlight `Note` in parentheses in help
- update 'titlestring' behaviour in documentation for invalid '%' format

closes: 

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-16 22:11:17 +02:00
Jeremy Fleischman
27fbf6e5e8
patch 9.1.0785: cannot preserve error position when setting quickfix list
Problem:  cannot preserve error position when setting quickfix lists
Solution: Add the 'u' action for setqflist()/setloclist() and try
          to keep the closes target position (Jeremy Fleischman)

fixes: 
closes: 

Signed-off-by: Jeremy Fleischman <jeremyfleischman@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-14 20:53:07 +02:00
Christian Brabandt
1961cafc99
runtime(doc): mention conversion rules for remote_expr()
fixes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-12 11:57:12 +02:00
zeertzjq
85f36d61e0
patch 9.1.0774: "shellcmdline" doesn't work with getcompletion()
Problem:  "shellcmdline" doesn't work with getcompletion().
Solution: Use set_context_for_wildcard_arg() (zeertzjq).

closes: 

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-10 19:14:13 +02:00
Ruslan Russkikh
0407d621bb
patch 9.1.0770: current command line completion is a bit limited
Problem:  current command completion is a bit limited
Solution: Add the shellcmdline completion type and getmdcomplpat()
          function (Ruslan Russkikh).

closes: 

Signed-off-by: Ruslan Russkikh <dvrussk@yandex.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-08 22:24:04 +02:00
Shougo Matsushita
6908428560
patch 9.1.0741: No way to get prompt for input()/confirm()
Problem:  No way to get prompt for input()/confirm()
Solution: add getcmdprompt() function (Shougo Matsushita)
          (Shougo Matsushita)

closes: 

Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-23 20:34:47 +02:00
Christian Brabandt
d657d3d8fd
runtime(doc): clarify the effect of the timeout for search()-functions
related: 
related: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-10 21:57:06 +02:00
zeertzjq
0cc5dce578
runtime(doc): clarify directory of Vim's executable vs CWD
According to :h win32-PATH, "the same directory as Vim" means the same
directory as the Vim executable, not Vim's current directory.  In patch
8.2.4860 these two concepts were mixed up.

closes: 

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-08 21:12:15 +02:00
h-east
52e7cc26d8
runtime(doc): tweak documentation style a bit
closes: 

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-28 17:03:29 +02:00
Shane Harper
c1b3984a7b
runtime(doc): minor updates.
closes: 

Signed-off-by: Shane Harper <shane@shaneharper.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-17 20:04:22 +02:00
zeertzjq
d4d1207208
patch 9.1.0590: Vim9: crash when accessing getregionpos() return value
Problem:  Vim9: crash when accessing getregionpos() return value.
Solution: Correct the return type (zeertzjq).

fixes: 
closes: 

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-16 20:34:16 +02:00
LemonBoy
a20bf69a3b
patch 9.1.0568: Cannot expand paths from 'cdpath' setting
Problem:  Cannot expand paths from 'cdpath' setting
          (Daniel Hahler)
Solution: Implement 'cdpath' completion, add the new 'dir_in_path'
          completion type (LemonBoy)

fixes 
closes: 

Signed-off-by: LemonBoy <thatlemon@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-11 22:45:42 +02:00
Ernie Rael
0512425891
patch 9.1.0564: id() can be faster
Problem:  id() can be made faster
Solution: don't use printf(), use clever shift of pointer
          (Ernie Rael)

closes: 

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-11 22:16:28 +02:00
Christ van Willegen
8252ef134f
patch 9.1.0560: bindtextdomain() does not indicate an error
Problem:  bindtextdomain() does not indicate an error
          (after v9.1.509)
Solution: return false on failure (OOM).
          (Chris van Willegen)

closes: 

Signed-off-by: Christ van Willegen <cvwillegen@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-11 21:36:21 +02:00
RestorerZ
965091001f
patch 9.1.0559: translation of vim scripts can be improved
Problem:  translation of vim scripts can be improved
          (after v9.1.0509)
Solution: improve documentation, add tests, include missing
          libraries for the Windows CI
          (RestorerZ)

closes: 

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-11 21:14:15 +02:00
Ernie Rael
c8e158be0e
patch 9.1.0548: it's not possible to get a unique id for some vars
Problem:  it's not possible to get a unique id for some vars
Solution: Add the id() Vim script function, which returns a unique
          identifier for object, dict, list, job, blob or channel
          variables (Ernie Rael)

fixes: 
closes: 

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-09 18:39:52 +02:00
LemonBoy
48b7d05a4f
patch 9.1.0547: No way to get the arity of a Vim function
Problem:  No way to get the arity of a Vim function
          (Austin Ziegler)
Solution: Enhance get() Vim script function to return the function
          argument info using get(func, "arity") (LemonBoy)

fixes: 
closes: 

Signed-off-by: LemonBoy <thatlemon@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-09 18:31:12 +02:00
errael
f0837ba0b9
runtime(doc): In builtin overview use {buf} as param for appendbufline/setbufline ()
Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-24 21:27:01 +02:00
Christ van Willegen
ce0ef910df
patch 9.1.0509: not possible to translate Vim script messages
Problem:  not possible to translate Vim script messages
          (RestorerZ)
Solution: implement bindtextdomain() and gettext() to support Vim script
          message translations (Christ van Willegen)

fixes: 
closes: 

Signed-off-by: Christ van Willegen <cvwillegen@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-20 23:41:59 +02:00
Marius Gedminas
c98bfb9f59
runtime(doc): wrong return type for execute() function
The description clearly explains that this function returns a string.  I
think the 'Number' here is a copy/paste error.

closes: 

Signed-off-by: Marius Gedminas <marius@gedmin.as>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-19 20:00:00 +02:00
Christian Brabandt
fbc37f138a
patch 9.1.0500: cannot switch buffer in a popup
Problem:  cannot switch buffer in a popup
          (Yggdroot)
Solution: add popup_setbuf() function

fixes: 
closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-18 21:01:23 +02:00
h-east
84ac2126f4
runtime(doc): Fix typos in several documents
closes: 

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-17 18:12:51 +02:00
Christian Brabandt
946f61c405
runtime(doc): clarify when text properties are cleared
related: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-17 13:17:58 +02:00
Christian Brabandt
c509c009bb
runtime(doc): fix wrong helptag for :defer
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-14 20:23:00 +02:00
Christian Brabandt
d6d4e13336
runtime(doc): rewrite mkdir() doc and simplify {flags} meaning
related: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-13 21:24:51 +02:00
zeertzjq
d353d27820
runtime(doc): restore description of "$" in col() and virtcol() ()
These are different from line() and getpos().

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-13 17:00:25 +02:00
zeertzjq
02f3ebacfb
runtime(doc): deduplicate getpos(), line(), col(), virtcol()
Move the main description to getpos() and link to that from the other
functions.

closes: 

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-12 21:04:10 +02:00
Peter Aronoff
210b39c2d6
runtime(doc): clarify documentation for "v" position at line()
Problem: the previous documentation falsely states that "v" always
refers to the start of a visual area.  In fact, the reference of "v" and
"." complement each other.  If the cursor is at the start of
a (characterwise) visual area, then "v" refers to the end of the area.

Solution: be more verbose and explicit about the connection between "."
and "v" and also refer to |v_o| which many vim users will be familiar
with for visual areas.

Signed-off-by: Peter Aronoff <peter@aronoff.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-11 19:23:08 +02:00
Christian Brabandt
5674c9a7de
runtime(doc): add return type info for Vim function descriptions
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-09 00:19:16 +02:00
Shougo Matsushita
60c8743ab6
patch 9.1.0465: missing filecopy() function
Problem:  missing filecopy() function
Solution: implement filecopy() Vim script function
          (Shougo Matsushita)

closes: 

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-03 23:01:40 +02:00
zeertzjq
dff55a3358
patch 9.1.0444: Not enough tests for getregion() with multibyte chars
Problem:  Not enough tests for getregion() with multibyte chars.
Solution: Add a few more tests (zeertzjq).

closes: 

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-25 10:25:36 +02:00
zeertzjq
afc2295c22
patch 9.1.0443: Can't use blockwise selection with width for getregion()
Problem:  Can't use a blockwise selection with a width for getregion().
Solution: Add support for blockwise selection with width like the return
          value of getregtype() or the "regtype" value of TextYankPost
          (zeertzjq).

closes: 

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-24 19:07:12 +02:00
zeertzjq
2b09de9104
patch 9.1.0441: getregionpos() can't properly indicate positions beyond eol
Problem:  getregionpos() can't properly indicate positions beyond eol.
Solution: Add an "eol" flag that enables handling positions beyond end
          of line like getpos() does (zeertzjq).

Also fix the problem that a position still has the coladd beyond the end
of the line when its column has been clamped.  In the last test case
with TABs at the end of the line the old behavior is obviously wrong.

I decided to gate this behind a flag because returning positions that
don't correspond to actual characters in the line may lead to mistakes
for callers that want to calculate the length of the selected text, so
the behavior is only enabled if the caller wants it.

closes: 

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-24 07:48:51 +02:00
zeertzjq
52a6f34887
patch 9.1.0430: getregionpos() doesn't handle one char selection
Problem:  getregionpos() doesn't handle one char selection.
Solution: Handle startspaces differently when is_oneChar is set.
          Also add a test for an exclusive charwise selection with
          multibyte chars (zeertzjq)

closes: 

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-22 16:42:44 +02:00
zeertzjq
c95e64f41f
patch 9.1.0423: getregionpos() wrong with blockwise mode and multibyte
Problem:  getregionpos() wrong with blockwise mode and multibyte.
Solution: Use textcol and textlen instead of start_vcol and end_vcol.
          Handle coladd properly (zeertzjq).

Also remove unnecessary buflist_findnr() in add_regionpos_range(), as
getregionpos() has already switched buffer.

closes: 

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-20 14:00:31 +02:00
Christian Brabandt
5cf5301e28
runtime(doc): clarify temporary file clean up
related: 

Co-authored-by: Enno <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-18 10:15:04 +02:00
K.Takata
c0e038b59f
runtime(doc): Remove trailing spaces ()
Fix the issues introduced by .
2024-05-16 12:39:01 +09:00
Enno
5faeb60480
runtime(doc): clarify {special} argument for shellescape()
closes: 

Signed-off-by: Enno <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-15 21:54:19 +02:00
Shougo Matsushita
b4757e627e
patch 9.1.0394: Cannot get a list of positions describing a region
Problem:  Cannot get a list of positions describing a region
          (Justin M. Keyes, after v9.1.0120)
Solution: Add the getregionpos() function
          (Shougo Matsushita)

fixes: 
closes: 

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-07 20:49:24 +02:00
h-east
53753f6a49
runtime(doc): Fix typos in help documents
closes: 

Co-authored-by: Christian Clason <c.clason@uni-graz.at>
Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-05 18:42:31 +02:00
zeertzjq
ad4881cb3c
runtime(doc): correct getscriptinfo() example ()
When "sid" is specified, it returns a List with a single item.

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-04 09:35:30 +02:00
Christian Brabandt
fe1e2b5e2d
runtime(doc): clarify syntax vs matching mechanism
fixes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-26 18:44:03 +02:00
Doug Kearns
9cd9e759ab
runtime(doc): Normalise builtin-function optional parameter formatting
These should generally be formatted as func([{arg}]) and referenced as
{arg} in the description.

closes: 

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-07 17:42:17 +02:00
glepnir
df46115fc8
patch 9.1.0265: console dialog cannot save unnamed buffers
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: 

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-04 23:43:19 +02:00
Aliaksei Budavei
9574022580
runtime(doc): Fill in a few details regarding :enums ()
- Mention the support of eval() for enumeration values.

- Clarify the extent of immutability for enumeration values.

- Specify the requirements for class methods to meet for
  class variable initialisation and their use in nested
  functions and lambda expressions.

- Remove a duplicate sentence that describes how to access
  parent class methods in derivative classes (see another
  "copy" two paragraphs below).


Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-04 22:05:33 +02:00
Yegappan Lakshmanan
3cf121ed31
patch 9.1.0233: Vim9: string() output of enum is problematic
Problem:  Vim9: string() output of enum is problematic
Solution: Make string() output for an enum consistent with that of a
          regular object (Yegappan Lakshmanan).

closes: 

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-31 18:45:35 +02:00
mityu
7f0bba2595
runtime(doc): Improve docs for empty(), len(), and string() on objects
closes: 

Signed-off-by: mityu <mityu.mail@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-29 10:14:41 +01:00
Yegappan Lakshmanan
3164cf8f12
patch 9.1.0219: Vim9: No enum support
Problem:  No enum support
Solution: Implement enums for Vim9 script
          (Yegappan Lakshmanan)

closes: 

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-28 10:38:28 +01:00
zeertzjq
ad38769030
patch 9.1.0199: Not enough tests for the slice() function
Problem:  Not enough tests for the slice() function.
Solution: Test with multibyte chars, and in both Legacy and Vim9 script.
          Update docs to be clearer about how it treats composing chars.
          (zeertzjq)

closes: 

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-23 08:25:41 +01:00
Christ van Willegen
c35fc03dbd
patch 9.1.0181: no overflow check for string formatting
Problem:  no overflow check for string formatting
Solution: Check message formatting function for overflow.
          (Chris van Willegen)

closes: 

Signed-off-by: Christ van Willegen <cvwillegen@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-14 18:58:04 +01:00