19134 Commits

Author SHA1 Message Date
eeacd7bd71 fix(api): adjust fix for reconfiguring float "relative" (#34287)
Problem:  "win" is cleared in float config after 96330843, even with
          unchanged "relative".
Solution: Don't clear "win". Avoid erroring for deleted "win" by setting
          the parent win to curwin directly when "win" is zero or not
          present in config.
2025-06-03 13:27:07 +02:00
eb10852804 vim-patch:9.1.1426: completion: register contents not completed
Problem:  CTRL-X CTRL-R only completes individual words from registers,
          making it difficult to insert complete register content.
Solution: Add consecutive CTRL-X CTRL-R support - first press completes
          words, second press completes full register lines, similar to
          CTRL-X CTRL-L and CTRL-X CTRL-P behavior (glepnir).

closes: vim/vim#17395

d5fdfa5c9c

Co-authored-by: glepnir <glephunter@gmail.com>
2025-06-03 16:25:49 +08:00
ee84518b94 fix(excmd): don't allow range or args for :detach/:restart (#34280)
Also remove the CMDWIN and LOCK_OK flags, so that there is no need to
check for text_locked() and curbuf_locked().
2025-06-03 01:03:43 +00:00
049877d379 fix(tui): make :restart use new size after terminal resize (#34282) 2025-06-03 00:18:04 +00:00
aa4fa24963 vim-patch:bfeefc4: runtime(doc): clarify the effect of exclusive single char selections (#34289)
closes: vim/vim#17410

bfeefc474a

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-06-02 23:54:29 +00:00
525c02a89f vim-patch:9.1.1424: PMenu selection broken with multi-line selection and limits
Problem:  PMenu selection broken with multi-line selection and limits
          (Maxim Kim)
Solution: update completion match index when limiting the completion
          sources (Girish Palya)

fixes: vim/vim#17394
closes: vim/vim#17401

6c40df09e0

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-06-03 06:30:47 +08:00
9bfd0162dc vim-patch:9.1.1422: scheduling of complete function can be improved
Problem:  scheduling of complete function can be improved
Solution: call user completion functions earlier when just determining
          the insertion column (Girish Palya)

This change improves the scheduling behavior of async user-defined
completion functions (such as `F{func}`, `F`, or `'o'` values in the
`'complete'` option), particularly benefiting LSP clients.

Currently, these user functions are invoked twice:

1. First with `findstart = 1` to determine the completion start
   position.
2. Then with `findstart = 0` to retrieve the actual matches.

Previously, both calls were executed back-to-back. With this change, the
first call (`findstart = 1`) is performed earlier—before any matches are
gathered from other sources.

This adjustment gives event-driven completion sources (e.g., LSP
clients) more time to send their requests while Vim concurrently
collects matches from other sources like the current buffer.

Not sure about the real-world performance gains, but this approach
should, in theory, improve responsiveness and reduce latency for
asynchronous completions.

To test, try using yegappan LSP client:

```vim
set cpt+=o^10
autocmd VimEnter * g:LspOptionsSet({ autoComplete: false, omniComplete: true })
```

If you prefer to use 'native' auto-completion (without plugins), try the
following configuration:

```vim
set cot=menuone,popup,noselect,nearest
autocmd TextChangedI * InsComplete()
def InsComplete()
  if getcharstr(1) == '' && getline('.')->strpart(0, col('.') - 1) =~ '\k$'
    SkipTextChangedI()
    feedkeys("\<c-n>", "n")
  endif
enddef
inoremap <silent> <c-e> <c-r>=<SID>SkipTextChangedI()<cr><c-e>
inoremap <silent> <c-y> <c-r>=<SID>SkipTextChangedI()<cr><c-y>
def SkipTextChangedI(): string
  set eventignore+=TextChangedI
  timer_start(1, (_) => {
    set eventignore-=TextChangedI
  })
  return ''
enddef
inoremap <silent><expr> <tab> pumvisible() ? "\<c-n>" : "\<tab>"
inoremap <silent><expr> <s-tab> pumvisible() ? "\<c-p>" : "\<s-tab>"
```

closes: vim/vim#17396

98c29dbfd1

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-06-03 06:30:47 +08:00
bec1449cc5 vim-patch:9.1.1416: completion limits not respected for fuzzy completions
Problem:  completion limits not respected when using fuzzy completion
          (Maxim Kim)
Solution: trim completion array (Girish Palya)

fixes: vim/vim#17379
closes: vim/vim#17386

19ef6b0b4b

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-06-03 06:30:47 +08:00
2411f924a3 vim-patch:9.1.1410: out-of-bounds access with 'completefunc'
Problem:  out-of-bounds access with 'completefunc' (csetc)
Solution: check if it is safe to advance cpt_sources_index
          (Girish Palya)

fixes: vim/vim#17363
closes: vim/vim#17374

7c621052c3

Co-authored-by: Girish Palya <girishji@gmail.com>
Co-authored-by: @csetc
2025-06-03 06:30:47 +08:00
eeff6ca8ff vim-patch:9.1.1409: using f-flag in 'complete' conflicts with Neovim
Problem:  using f-flag in 'complete' conflicts with Neovims filename
          completion (glepnir, after v9.1.1301).
Solution: use upper-case "F" flag for completion functions
          (Girish Palya).

fixes: vim/vim#17347
closes: vim/vim#17378

14f6da5ba8

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-06-03 06:30:47 +08:00
13aec582b4 vim-patch:fa8b7db: runtime(doc): tweak documentation style in options.txt
closes: vim/vim#17229

fa8b7db99a

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2025-06-03 06:30:47 +08:00
857ff5cae9 vim-patch:9.1.1313: compile warning about uninitialized value
Problem:  compile warning about uninitialized value
          (Tony Mechelynck, after v9.1.1311)
Solution: initialize variable on declaration

b53d4fb63e

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-06-03 06:30:47 +08:00
b6acf6112b vim-patch:9.1.1311: completion: not possible to limit number of matches
Problem:  completion: not possible to limit number of matches
Solution: allow to limit the matches for 'complete' sources by using the
          "{flag}^{limit}" notation (Girish Palya)

This change extends the 'complete'  option to support limiting the
number of matches returned from individual completion sources.

**Rationale:** In large files, certain sources (such as the current
buffer) can generate an overwhelming number of matches, which may cause
more relevant results from other sources (e.g., LSP or tags) to be
pushed out of view. By specifying per-source match limits, the
completion menu remains balanced and diverse, improving visibility and
relevance of suggestions.

A caret (`^`) followed by a number can be appended to a source flag to
specify the maximum number of matches for that source. For example:
```
  :set complete=.^9,w,u,t^5
```
In this configuration:
- The current buffer (`.`) will return up to 9 matches.
- The tag completion (`t`) will return up to 5 matches.
- Other sources (`w`, `u`) are not limited.

This feature is fully backward-compatible and does not affect behavior
when the `^count` suffix is not used.

The caret (`^`) was chosen as the delimiter because it is least likely
to appear in file names.

closes: vim/vim#17087

0ac1eb3555

Cherry-pick test_options.vim change from patch 9.1.1325.

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-06-03 06:30:47 +08:00
c249389adb vim-patch:9.1.1302: Coverity warns about using uninitialized value
Problem:  Coverity warns about using uninitialized value
          (Coverity, Tony Mechelynck, after v9.1.1301)
Solution: initialize callback pointer to NULL

d2079cff48

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-06-03 06:30:47 +08:00
7651c43252 vim-patch:9.1.1301: completion: cannot configure completion functions with 'complete'
Problem:  completion: cannot configure completion functions with
          'complete'
Solution: add support for setting completion functions using the f and o
          flag for 'complete' (Girish Palya)

This change adds two new values to the `'complete'` (`'cpt'`) option:
- `f` – invokes the function specified by the `'completefunc'` option
- `f{func}` – invokes a specific function `{func}` (can be a string or `Funcref`)

These new flags extend keyword completion behavior (e.g., via `<C-N>` /
`<C-P>`) by allowing function-based sources to participate in standard keyword
completion.

**Key behaviors:**

- Multiple `f{func}` values can be specified, and all will be called in order.
- Functions should follow the interface defined in `:help complete-functions`.
- When using `f{func}`, escaping is required for spaces (with `\`) and commas
  (with `\\`) in `Funcref` names.
- If a function sets `'refresh'` to `'always'`, it will be re-invoked on every
  change to the input text. Otherwise, Vim will attempt to reuse and filter
  existing matches as the input changes, which matches the default behavior of
  other completion sources.
- Matches are inserted at the keyword boundary for consistency with other completion methods.
- If finding matches is time-consuming, `complete_check()` can be used to
  maintain responsiveness.
- Completion matches are gathered in the sequence defined by the `'cpt'`
  option, preserving source priority.

This feature increases flexibility of standard completion mechanism and may
reduce the need for external completion plugins for many users.

**Examples:**

Complete matches from [LSP](https://github.com/yegappan/lsp) client. Notice the use of `refresh: always` and `function()`.

```vim
set cpt+=ffunction("g:LspCompletor"\\,\ [5]). # maxitems = 5

def! g:LspCompletor(maxitems: number, findstart: number, base: string): any
    if findstart == 1
        return g:LspOmniFunc(findstart, base)
    endif
    return {words: g:LspOmniFunc(findstart, base)->slice(0, maxitems), refresh: 'always'}
enddef
autocmd VimEnter * g:LspOptionsSet({ autoComplete: false, omniComplete: true })
```

Complete matches from `:iabbrev`.

```vim
set cpt+=fAbbrevCompletor

def! g:AbbrevCompletor(findstart: number, base: string): any
    if findstart > 0
        var prefix = getline('.')->strpart(0, col('.') - 1)->matchstr('\S\+$')
        if prefix->empty()
            return -2
        endif
        return col('.') - prefix->len() - 1
    endif
    var lines = execute('ia', 'silent!')
    if lines =~? gettext('No abbreviation found')
        return v:none  # Suppresses warning message
    endif
    var items = []
    for line in lines->split("\n")
        var m = line->matchlist('\v^i\s+\zs(\S+)\s+(.*)$')
        if m->len() > 2 && m[1]->stridx(base) == 0
            items->add({ word: m[1], info: m[2], dup: 1 })
        endif
    endfor
    return items->empty() ? v:none :
        items->sort((v1, v2) => v1.word < v2.word ? -1 : v1.word ==# v2.word ? 0 : 1)
enddef
```

**Auto-completion:**

Vim's standard completion frequently checks for user input while searching for
new matches. It is responsive irrespective of file size. This makes it
well-suited for smooth auto-completion. You can try with above examples:

```vim
set cot=menuone,popup,noselect inf

autocmd TextChangedI * InsComplete()

def InsComplete()
    if getcharstr(1) == '' && getline('.')->strpart(0, col('.') - 1) =~ '\k$'
        SkipTextChangedIEvent()
        feedkeys("\<c-n>", "n")
    endif
enddef

inoremap <silent> <c-e> <c-r>=<SID>SkipTextChangedIEvent()<cr><c-e>

def SkipTextChangedIEvent(): string
    # Suppress next event caused by <c-e> (or <c-n> when no matches found)
    set eventignore+=TextChangedI
    timer_start(1, (_) => {
        set eventignore-=TextChangedI
    })
    return ''
enddef
```

closes: vim/vim#17065

cbe53191d0

Temporarily remove bufname completion with #if 0 to make merging easier.

Co-authored-by: Girish Palya <girishji@gmail.com>
Co-authored-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: glepnir <glephunter@gmail.com>
2025-06-03 06:30:46 +08:00
963308439a fix(api): reconfiguring float "relative" does not clear "win" (#34271)
Problem:  Unable to change the "relative" of a flag after its target
          "win" no longer exists.
Solution: Unset target window if it is not present in config and
          reconfigured "relative" no longer expects a target window.
2025-06-02 14:59:19 +02:00
86835b3db3 feat(editor): ":restart" command #33953
Problem:
Developing/troubleshooting plugins has friction because "restarting"
Nvim requires quitting and manually starting again. #32484

Solution:
- Implement a `:restart` command which emits `restart` UI event.
- Handle the `restart` UI event in the builtin TUI client: stop the
  `nvim --embed` server, start a new one, and attach to it.
2025-06-02 05:54:17 -07:00
5fd03508aa vim-patch:95ea0b0: runtime(doc): make 'shiftwidth' setting more precise (#34266)
closes: vim/vim#17414

95ea0b0f8d

Co-authored-by: Damien Lejay <damien@lejay.be>
2025-06-02 08:26:34 +08:00
52991d8728 fix(windows): don't set window icon on SIGHUP #34260
Problem:  When using conhost and pressing the 'x' button
          to close it while nvim is open, nvim hangs up
          while trying to reset the window icon, causing a big
          delay before the terminal actually closes. #34171

Solution: Set the window handle to NULL after receiving SIGHUP
          so that nvim will not try resetting the icon.
2025-06-01 15:23:42 -07:00
981d4ba45e fix(eval): winnr('$') counts non-current hidden/unfocusable windows #34207
Problem:  Non-visible/focusable windows are assigned a window number,
          whereas commands that use this window number skip over them.

Solution: Skip over non-visible/focusable windows when computing
          the window number, unless it is made the current window
          through the API in which case an identifiable window number
          is still useful. This also ensures it matches the window
          number of the window entered by `<winnr>wincmd w` since
          403fcacf.
2025-06-01 15:12:12 -07:00
5cfbc35aa8 fix(api): add missing nargs field to user command Lua callbacks #34210
Problem: nvim_create_user_command() Lua callbacks were missing the documented nargs field in the options table passed to the callback function.

Solution: Add nargs field derivation from command argument type flags in nlua_do_ucmd(), using the same logic as nvim_parse_cmd().
2025-06-01 15:03:35 -07:00
80753332d1 docs: news, intro, lsp, api #33687 2025-06-01 14:13:50 -07:00
2763d06100 vim-patch:9.1.1419: It is difficult to ignore all but some events (#34245)
Problem:  It is difficult to ignore all but some events.
Solution: Add support for a "-" prefix syntax in '(win)eventignore' that
          subtracts an event from the ignored set if present
          (Luuk van Baal).

8cc6d8b187
2025-05-31 14:51:29 +02:00
d29b800515 vim-patch:a4a3f71: runtime(doc): clarify tabstop settings and guidance
closes: vim/vim#17381

a4a3f712e2

Co-authored-by: Damien Lejay <damien@lejay.be>
Co-authored-by: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com>
Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-05-31 08:15:25 +08:00
7ed8e96994 fix(redraw): update curswant for Visual selection (#34241)
Problem:  Blockwise Visual selection not redrawn correctly when moving
          cursor for more than 1 cells with 'virtualedit'.
Solution: Restore the curswant update removed in 6679687bb3.
2025-05-30 23:47:13 +00:00
9d5eb3eda5 docs: rename builtin.txt, eval.txt #34212
Problem:
Despite the name, `builtin.txt` only includes Vimscript functions, which
is confusing, especially to people who only use Lua to configure Nvim

Solution: From justinmk's suggestion
- Rename `builtin.txt` to `vimfn.txt`
- Rename `eval.txt` to `vimeval.txt`
- The tags `*builtin.txt*` and `*eval.txt*` should be kept for Vim-patches

Closes #33743
2025-05-30 08:57:58 -07:00
756751afa3 fix(terminal): stack overflow when too many csi args (#34012)
fix: stack overflow when too many csi args

Problem:
Crash when csi contains > 16 args. It's easy to trigger
when you attempt to pipe external terminal scrollback buffer.
```sh
nvim --clean --cmd "term printf
'\e[38:2:59:66:97;48:2:36:40:59;58:2:224:175:104;4:3m'"
```

Solution:
Increase buffer size.
2025-05-30 06:57:07 -05:00
b28bbee539 fix(terminal): skip setting string_initial to false on no-op (#34176)
Problem:

Currently undefined behavior can occur when `string_fragment()` is
called with `OSC_COMMAND`. This is because when the state changes to
`OSC_COMMAND`, `string_initial` is set to true. Then in some cases,
directly after this `string_initial` will be set back to false before
the on_osc callback is called, this leads to `term_settermprop()` never
initializing the title.

Solution:

In all of the no-op cases in `string_fragment()` currently, we continue
to the end of the function where `vt->parser.string_initial` is set to
false. This change returns in the no-op cases instead since in these
cases the string has not yet been terminated and sent to the callback.

Note:

This change also adds a test with a byte sequence from the file
in #34028 that caused nvim to crash. This byte sequences is the shortest
sequence I could trim down from that file that still would trigger the
crash. There are also two other tests I added which validate that
setting the title with OSC-0 and OSC-2 still works.

Fixes: #34028
2025-05-29 13:29:16 -05:00
6c4ddf607f vim-patch:9.1.1417: missing info about register completion in complete_info() (#34219)
Problem:  missing info about register completion in complete_info()
          (after v9.1.1408)
Solution: update documentation and mention that register is used as
          source, add a test (glepnir)

closes: vim/vim#17389

49864aecd0

Co-authored-by: glepnir <glephunter@gmail.com>
2025-05-29 07:09:50 +08:00
f2373a89d7 vim-patch:9.1.1408: not easily possible to complete from register content (#34198)
Problem:  not easily possible to complete from register content
Solution: add register-completion submode using i_CTRL-X_CTRL-R
          (glepnir)

closes: vim/vim#17354

0546068aae
2025-05-28 09:10:00 +00:00
85d33514f9 feat(api): set nvim_echo() kind for ext_messages (#33998)
Problem:  Unable to emit a message with arbitrary kind.
Solution: Add a "kind" opts field to nvim_echo().
          Use it to set the "list_cmd" kind for vim.show_pos().
2025-05-27 13:01:10 +02:00
66dddd8b51 fix(folds): adjust filler text drawing for transparent folds
Problem: Search highlighting is applied strangely to the filler text of
transparent folds, and EOL list characters are not shown.

Solution: Don't apply search highlighting to the last column of the window row
if the last text char on the line is highlighted. Display the EOL list char if
needed. Don't highlight the entire filler text when matching EOL, just highlight
the EOL list char or the first filler char.
2025-05-27 08:54:59 +01:00
c4e52d604c vim-patch:9.1.1413: spurious CursorHold triggered in GUI on startup (#34195)
Problem:  spurious CursorHold triggered in GUI on startup
Solution: init global did_cursorhold flag to true
          (Gary Johnson)

When Vim is started in GUI mode, the CursorHold autocommand event is
triggered 'updatetime' milliseconds later, even when the user has not
pressed a key.  This is different from the behavior of Vim in terminal
mode, which does not trigger a CursorHold autocommand event at startup,
and contradicts the description of the CursorHold event in ":help
CursorHold", which states that the event is "[n]ot triggered until the
user has pressed a key".

The fix is to change the initial value of did_cursorhold from FALSE to
TRUE.  While it is true that the CursorDone event has not been done yet
at startup, it should appear to have been done until the user presses
a key.

fixes vim/vim#17350
closes: vim/vim#17382

318ff9c362

Co-authored-by: Gary Johnson <garyjohn@spocom.com>
2025-05-27 09:16:46 +08:00
fbf5fbacc2 vim-patch:f0c7090: runtime(doc): trailing whitespace in options.txt, delete it.
f0c7090a38

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-05-27 07:24:56 +08:00
e35a7d4782 vim-patch:a6172f8: runtime(doc): Correct allowed characters at :help 'filetype'
closes: vim/vim#17366

a6172f8c5c

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-05-27 07:24:18 +08:00
bd01bd6564 vim-patch:9.1.1407: Can't use getpos('v') in OptionSet when using setbufvar() (#34177)
Problem:  Can't use getpos('v') in OptionSet when using setbufvar().
Solution: Don't reset Visual selection when switching to the same
          buffer (zeertzjq).

closes: vim/vim#17373

5717ee33db
2025-05-25 22:51:15 +00:00
8b9500c886 fix(system): don't treat NUL at start as no input (#34167) 2025-05-25 09:28:11 +08:00
c9d8468020 feat(search): increase MAX_COUNT to 999
Problem: "99 searchcount ought to be enough for anyone."

Solution: Increase `SEARCH_STAT_DEF_MAX_COUNT` to 999, which I'm sure
will suffice for the next twenty years.

Co-authored-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
2025-05-24 10:55:43 +02:00
abb40ecedd feat(ui): "append" parameter for "msg_show" UI events
Problem:  Consecutive "msg_show" events stemming from an `:echon`
          command are supposed to be appended without a newline, this
          information is not encoded in the "msg_show" event.
Solution: Add an "append" parameter to the "msg_show" event that is set
          to true to indicate the message should not start on a new line.
Considered alternative: Emit a newline for the common case instead at the
start of a new message. That way UIs can more closely follow the logic
as it is implemented for the message grid currently. This would be a
breaking change. The "append" parameter seems OK.
2025-05-24 01:02:22 +02:00
6ce2877327 fix(move): consume skipcol before revealing filler lines (#34143)
Problem:  When scrolling (the text) down with 'smoothscroll', filler
          lines are revealed before the text skipped with `w_skipcol`.
Solution: Check `w_skipcol` before filler lines.
2025-05-24 00:45:00 +02:00
153a910897 vim-patch:9.1.1402: multi-byte mappings not properly stored in session file (#34131)
Problem:  multi-byte mappings not properly stored in session file
Solution: unescape the mapping before writing out the mapping, prefer
          single-byte mapping name if possible (Miguel Barro)

closes: vim/vim#17355

5b07aff2f6

Co-authored-by: GuyBrush <miguel.barro@live.com>
2025-05-23 07:42:30 +08:00
2d4b028d02 fix(tests): use correct include path for unittest
Copy whatever was made to work for generated headers:

(1) we need to consider all cmake targets not just main_lib
(2) we need to add the sysroot for macOS
2025-05-22 11:56:46 +02:00
8d397fa458 feat(exrc): stop searching in parent directories by unsetting 'exrc'
Problem:
No way for a user to limit 'exrc' search in parent directories (compare
editorconfig.root).

Solution:
A configuration file can unset 'exrc', disabling the search for its
parent directories.
2025-05-20 00:03:14 +02:00
dc6885dc24 vim-patch:9.1.1398: completion: trunc does not follow Pmenu highlighting attributes (#34084)
Problem:  When items are combined with user-defined highlight attributes
          (e.g., strikethrough), trunc inherits these attributes, making
          the text difficult to read.
Solution: trunc now uses the original Pmenu and PmenuSel highlight
          attributes (glepnir)

closes: vim/vim#17340

0816f17e9a

Co-authored-by: glepnir <glephunter@gmail.com>
2025-05-19 08:11:54 +08:00
a87aa68ed0 Merge pull request #34071 from bfredl/tagutf
refactor(helptags): remove useless homegrown encoding check
2025-05-18 11:36:12 +02:00
23c214ed4a build(deps): bump uncrustify to 0.81.0 2025-05-18 09:59:21 +02:00
9a322f8103 refactor(helptags): remove useless homegrown encoding check
This check was always broken. it will "detect" a file as
other-than-UTF-8 if the first line of a help file only is ASCII.

This only works by accident, as all our help files are UTF-8 (or
ASCII-only, which is fully compatible), but are all ASCII-only
on the first line of every help file which means that all helpfiles
gets detected as not-UTF8 which makes the "consistency" test pass
by accident even though the actual consistency is that every single
file is UTF-8 compatible. This means that the
"!_TAG_FILE_ENCODING\tutf-8\t" meta-tag already did not get emitted
but YAGNI in either case as no encoding tag just means that 'encoding'
is used which in neovim always is UTF-8 anyway.

An alternative approach would be to integrate the real encoding
detection already present in the codebase (an editor which edits text of
various encodings) which checks the entire file instead of a weird
first-line-only-hack, but as it happens to be 2025 the resolution of
encoding trouble is to just use UTF-8 everywhere. And if you use something
else you have to keep track yourself anyway it is not like we can detect
if one helpfile of your plugin is latin-1 and another is latin-2 or
whatever. Also, Nvim will detect the encoding of the file when you open
the file as a :help buffer anyway.
2025-05-17 17:01:09 +02:00
99384fcd9c vim-patch:9.1.1396: 'grepformat' is a global option (#34060)
Problem:  The 'grepformat' option is global option, but it would be
          useful to have it buffer-local, similar to 'errorformat' and
          other quickfix related options (Dani Dickstein)
Solution: Add the necessary code to support global-local 'grepformat',
          allowing different buffers to parse different grep output
          formats (glepnir)

fixes: vim/vim#17316
closes: vim/vim#17315

7b9eb6389d

Co-authored-by: glepnir <glephunter@gmail.com>
2025-05-17 00:20:20 +00:00
ec5f054dc9 vim-patch:9.1.1395: search_stat not reset when pattern differs in case (#34058)
Problem:  search_stat not reset when pattern differs in case
          (tahzibijafar)
Solution: use STRNCMP instead of MB_STRNICMP macro

There was a long standing todo comment, that using MB_STRNICMP is wrong.
So let's change it to STRNCMP() instead. Even if it not handle
multi-byte characters correctly, then Vim will rather recompute the
search stat, instead of re-using the old (and possibly wrong) value.

fixes: vim/vim#17312
closes: vim/vim#17314

670d0c1468

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-05-16 23:47:20 +00:00
6af1b7e5e8 fix(:print): don't use schar_from_ascii() for illegal byte (#34046) 2025-05-17 06:35:20 +08:00