Commit Graph

8540 Commits

Author SHA1 Message Date
Justin M. Keyes
a1ea2f35be Merge #41075 from echasnovski/pack-packspec-part1 2026-08-13 08:53:49 -04:00
Nathan Zeng
4a3197f2ad refactor(defaults): edit global cwd on "1-" #41254
Problem:
`1-` does nothing from a directory buffer, because we are already in the
buffer-local CWD. It's also unintuitive that this mapping behaves
differently based on the resolved CWD.

Solution:
Have `1-` open the global CWD.
2026-08-11 04:08:33 -04:00
Justin M. Keyes
2546741d1b fix(extmarks): undo-redo of a mark explicitly moved during an edit #41252
Problem:
A mark moved by nvim_buf_set_extmark() during an edit is misplaced by
undo and redo. Only splices ("edits") are recorded, and replaying them
reproduces the shifts they caused, never the explicit set: the mark ends
up wherever the text pushed it.

Solution:
When an open undo block moves an existing mark, record both positions.
Undo restores the pre-set position, redo re-applies the set.

Partially reverts 18334a4a0c ; ExtmarkSavePos.row/col were unused
because nothing recorded an explicit move, but now `extmark_set()` does.
2026-08-10 04:21:31 -04:00
Kyle
8d406ed2ac fix(defaults): emit events on automatic background change #41242
Problem:
After #40270, events are no longer emitted from the automatic background
detection. This applies not just during startup, but also if the user
manually changes the background of their terminal.

Solution:
Set the background as normal, assuming that a normal terminal will
respond within 100 ms. Change test to match expected behavior:
- BG set during startup won't trigger user autocmds since it runs before
  any user config
- If the terminal takes longer than 100 ms to respond to initial OSC 11,
  it does trigger the OptionSet, but it is triggered through the normal
  path to ensure values like v:option_new are set #38551
- BG change after startup still triggers autocmds #41146
2026-08-10 04:17:51 -04:00
Justin M. Keyes
9e283f273b test(terminal): unreliable "spawns in CWD effective at time of invocation"
FAILED  …/terminal/ex_terminal_spec.lua @ 270: :terminal (fake shell) spawns in CWD effective at time of invocation
    Expected values to differ.
    Value:
    "~/work/neovim/neovim/build/Xtest_xdg_terminal"
    stack traceback:
   …/terminal/ex_terminal_spec.lua:276: in function <…/terminal/ex_terminal_spec.lua:270>
2026-08-08 02:23:55 +02:00
tao
f0a0182285 refactor(path): pathcmp() #41035
Problem:
Redudant code

Solution:
Add `path_fold_char()` to normalize path sep.
Refactor `pathcmp()` and `path_fnamencmp()` into `path_cmp`.

| feature                  | pathcmp        | path_fnamencmp | path_cmp(now) |
| ------------------------ | -------------- | -------------- | ------------- |
| case folding             | `mb_toupper()` | `utf_fold()`   | `utf_fold()`  |
| consults fileignorecase  |              |              | `ic` param    |
| `maxlen`                 |              |              |             |
| `/` == `\`               |              |              |             |
| MSWIN drive letter       |              |              |             |
| sep affects sorting      |              |              |             |
| ignores a trailing slash |              |              |             |

Refactor `path_fnamecmp` and `path_full_compare` into `path_equal`,
with flags controlling "no filesystem" comparison (i.e. `path_cmp`), env
variables expansion, absolute path resolution and filesystem access.
2026-08-07 19:54:29 -04:00
Justin M. Keyes
b53c00b425 fix(progress): ins-compl progress-msg during pum #41226
Problem:
The insert-mode completion progress-message is in "running" state while
the user is selecting an item. That is noisy and unwanted UX; it was
only intended for the "Scanning..." task.

Solution:
End the progress-msg just after `ins_compl_show_statusmsg`.
2026-08-07 22:49:44 +00:00
Justin M. Keyes
33a688f9fe fix(messages): dangling progress-messages #41222
Problem:
Some builtin features emit progress-messages which never "complete".
- On failure, `:write` does not complete the progress-msg it started.
- ins-completion never ends its "Scanning..." message.

Solution:
- `buf_write()` emits "failed" status on failure.
- `ins_compl_stop()` ends the completion one.
2026-08-07 16:10:02 -04:00
Justin M. Keyes
0a2676e54a fix(messages): :read starts a "bufwrite" progress #41219
Problem:
filemess() treats an empty suffix as "a buffer write is starting", but
readfile() calls it that way too. So ":read" (and ":edit", …) opens a
`nvim.bufwrite "<file>"` progress that is never completed.

Users of e.g. ghostty will see a stuck "progress" spinner.

Solution:
Only `buf_write()` starts the progress, via `filemess_progress()`.
2026-08-07 13:21:17 -04:00
Erdiansyah
59597316a6 fix(cwd): :bcd lost by nvim_win_set_buf, nvim_open_win #41218
Problem:
:bcd (buffer-local directory) is not preserved after
`nvim_open_win` or `nvim_win_set_buf`

Analysis:
set_curbuf() ends with update_cwd(), which falls back to
os_chdir(globaldir) when the target buffer has no b_localdir.

Solution:
Pass kCtxKeepCwd to ctx_switch().
2026-08-07 12:09:22 -04:00
Justin M. Keyes
7e53d3ba4d fix(cwd): keep buffer-local dir when re-editing #41215
Problem:
Re-editing a buffer (`:edit!`, re-reading a dir.lua buffer, etc.) drops
its `:bcd` directory, so the CWD falls back to the global one. Whereas
other buffer-local state (`b:` vars, local options) survives a reload.

Solution:
Don't clear buf dir in `buf_freeall()`; `do_ecmd()` calls that when
reloading/re-editing. `free_buffer_stuff()` still clears them when
a buffer is freed or reused for another file.
2026-08-07 14:10:21 +00:00
Justin M. Keyes
2e0a5a596a fix(terminal): spawn in effective CWD #41211
Problem:
`:terminal` does not respect the invocation-time CWD.
This wasn't noticeable with `:lcd` because the window-local CWD gets
applied to the new terminal buffer. But it is noticeable with `:bcd`.

Solution:
Specify `cwd` in the job spec.
2026-08-07 07:44:19 -04:00
Barrett Ruth
bc9d27b0bc fix(window): 'winbar' in single-row win overlaps global 'statusline' #41188 2026-08-07 07:06:23 -04:00
Freddie Haddad
a8da01f8e6 fix(decor): highlight without 'hl_eol' bleeds into wrap gaps #41160
Problem:
'linebreak' filler and 'breakindent'/'showbreak' padding are screen
cells with no buffer character behind them, yet a decoration draws over
them whether or not it asked to cover such cells. A highlight bounded to
its text then paints a tail out to the edge of the row, most visible on
inline code spans from plugins. That same highlight already leaves the
cells past the end of a line alone, so it treats identical cells two
different ways.

Solution:
Only a decoration with 'hl_eol' draws the gaps, which is what the flag
already means at the end of a line. A full-width background such as a
fenced code block sets it and still covers them. Classic :syntax has no
such flag and is unchanged.
2026-08-07 05:09:48 -04:00
Justin M. Keyes
a4a544032a feat(cwd)!: :lcd! (bang), rearrange :bcd/:lcd/… scope precedence #41194
Problem:
- buf-local CWD scope is lower priority than :lcd, which is weird.
  ```
  win > buf > tab > global
  ```
- No way to clear current CWD at a given scope.

Solution:
- Rerrange scope precedence to:
  ```
  buf > win > tab > global
  ```
- Introduce "bang" variants (`:bcd!`/`:lcd!`/`:tcd!`) which clears the
  local CWD for the given scope.
2026-08-07 04:41:37 -04:00
zeertzjq
439c967010 fix(drawline): 'statuscolumn' breaks unprintable char wrapping (#41198)
Problem:
Evaluating 'statuscolumn' overwrites transchar_charbuf[], which breaks
the drawing of an unprintable char if p_extra points there.

Solution:
Make a copy in wlv.extra so that it won't be overwritten.
2026-08-07 04:01:38 +00:00
Barrett Ruth
3a39646693 fix(window): 'laststatus' change pushes win past last row #41189
Problem:
Giving a window a status line when `'laststatus'` starts requiring one
takes the row from a resizable frame found by walking up the frame
tree, but only the window's own leaf frame is grown back. Every frame
between the leaf and the donor keeps its old height, so a later resize
hands out a row that does not exist and a window's status line ends up
on the command line.

Solution:
Grow the window's frame with `frame_setheight()`, which takes the row
from a neighbouring frame and keeps every enclosing frame consistent.
2026-08-06 08:39:59 -04:00
Justin M. Keyes
eb19a52b7c feat(vim._with): keepcwd 2026-08-06 13:17:07 +02:00
Justin M. Keyes
1c1dc0558f feat(cwd): support explicit chdir (:bcd/:tcd/…) in temp context
Problem:
- Explicit `:bcd` (etc.) persists from `nvim_buf_call()` but not from an
  autocmd handler targeting a hidden buf (`LspAttach`, `TermRequest`, …),
  which needs a `vim.schedule()` workaround.
- `vim._with()` is supposed to work as a "sandbox", discarding
  side-effects, but it leaks CWD changes: `:lcd` from a `win` context,
  any chdir from a visible-buffer context.

Solution:
- Explicit :cd/:tcd/:bcd during a temp context persists by default.
  - "Ambient" directory changes ('autochdir', existing win-local CWD,
    etc.) are still undone, as before.
- Add `kCtxKeepDirs`: snapshot/restore the target's full CWD state
  (w/b/tp-local, global, cwd). Used by `vim._with()` and `'inccommand'`,
  which must not leak state.
2026-08-06 13:17:07 +02:00
Justin M. Keyes
7d2249c579 docs: misc, :bcd, slug() 2026-08-06 10:27:29 +02:00
Barrett Ruth
8b0f33a1ab feat(dir): set buffer-local CWD #41174 2026-08-06 03:39:53 -04:00
Olivia Kinnear
6107629c5b feat(fs): vim.fs.normalize{plain:boolean} #41127
`opts.plain=true` does not expand tildes in addition to environment
variables, unlike `opts.expand_env=false`.

`opts.expand_env=false` is soft-deprecated.
2026-08-05 16:11:13 -04:00
Justin M. Keyes
ab80ea92cc fix(ui2): pager handling #41179
- Avoid shared state. Pass `focus` to set_pos()/expand_msg() instead of
  a shared `pager_focus` flag: the flag is only cleared when set_pos()
  actually enters the pager, so ":messages" from inside the pager left
  it set.
- pager_shown(): the pager window is invalid after leaving it with "q".
- Reuse pager_shown() in expand_msg().
2026-08-05 15:07:19 -04:00
Erdiansyah
a29a9130a9 fix(ui2): do not steal focus when consecutive cmds emit messages #41062
Problem:  A message emitted while a previous expanded message is still
          visible opens the pager and enters it, moving focus away from
          the buffer window without an explicit request (#41061).
Solution: Only enter the pager when it was explicitly requested ("g<",
          :messages, or entered from the expanded cmdline). An unfocused
          pager is dismissed by the cmdline key handler, which stays armed
          across the cmdline and no longer dismisses on non-typed keys
          (#39221).
2026-08-05 14:07:59 -04:00
Oleh Kostiuk
23525dd4e3 fix(editorconfig): avoid trim_trailing_whitespace in insert-mode #41175
Problem:
During insert-mode / replace-mode, `autowrite` may trigger. If it does, the
cursor position can shift due to the automatic removal of trailing spaces on the
current line. When I resume typing, the space between the last word and the new
word is suddenly gone.

Solution:
Disable the "remove trailing spaces" handler during Insert (or a similar) mode.
Autosave logic is not affected.
2026-08-05 14:06:28 -04:00
Barrett Ruth
9127ed41a5 fix(dir): preserve alternate file #41177 2026-08-05 13:36:58 -04:00
Tanishq
e2c0c63452 fix(statusline): don't clobber global statusline during autocmd #41169
Problem:
With `laststatus=3`, a pager float shares the main grid's statusline
row. Setting a diagnostic fires `DiagnosticChanged`, whose handler calls
`nvim__redraw({ statusline = true })`.

Analysis:
Inside the autocmd, `curwin` is temporarily switched to the tiled window
showing that buffer, so `win_redr_status()` paints its statusline over
the pager's `[Pager]` statusline on the shared row. After the autocmd,
`curwin` is restored but the pager statusline is never repainted.

Solution:
Use `ctx_saved_curwin()` decide whether to draw the global statusline,
matching `win_redr_stl_expr()` and `update_screen()`. No behavior change
if no buffer-context switch is active.
2026-08-05 13:35:09 -04:00
Chris Hebert
e58f29ca3e fix(terminal): OSC 52 multiline copy replaces newlines with NUL #41097
Problem: An OSC 52 sequence from a :terminal job passes the decoded
payload to the clipboard provider as a single list item. Command-line
providers (pbcopy, xclip, ...) receive it with channel semantics, where
a newline inside an item is sent as NUL (:h chansend()), so multiline
copies arrive with NUL bytes instead of newlines.

Solution: Split the payload on newlines into a proper list of lines.
A trailing newline yields a final empty item, which chansend() turns
back into a newline, so payloads round-trip exactly.
2026-08-05 06:37:02 -04:00
glepnir
6d8401f8d5 fix(ui): missing vertical separator for a winbar only window (#41151)
Problem: A winbar-only window with zero text height still occupies one row,
         but win_update() returns early on w_view_height == 0 and skips the
         vertical separator.

Solution: Also draw the vertical separator in the early return path.
2026-08-05 06:42:39 +08:00
Justin M. Keyes
2f9ef98a33 test(chdir): cleanup #41161
Problem:
Some assertions are erroneously skipped for `not is_os('win')`.

Solution:
Update tests. Deduplicate logic.
2026-08-04 15:38:22 -04:00
Willaaaaaaa
7b03df5d54 feat(lua): vim.fs.slug() #41005
Problem:
Several subsystems need to derive a short, filesystem-safe identifier from an
arbitrary path, and each reinvents it ad-hoc:
- `'undodir'` and `swapfiles` encode the full path into a single filename, which
  may exceed filesystem length-limits.
- `:connect ssh://` needs the SSH ControlPath socket name to stay under the
  104-byte `sun_path` limit on macOS; today the path overflows it.
- the upcoming :terminal state dir.
- arbitrary plugin purposes.

Solution:
Provide `vim.fs.slug()`, which generates a bounded, one-way filename from an
arbitrary string. The input is normalized so equivalent paths produce the
same result. An 8-char hash is appended for uniqueness
2026-08-04 15:24:35 -04:00
Justin M. Keyes
9cd4dd1c19 fix(:bcd): do not "inherit" buffer-local dir
Problem:
Buffer-local CWD (:bcd) is "sticky", similar to window-local CWD (:lcd).
But this contradicts one of its main benefits: per-buffer "project root"
for LSP, OSC7.

Other problems:
- A buffer created with :edit/:enew/:new silently inherits b_localdir
  (and b_prevdir) from the previous buffer.
- curbuf_reusable() refuses to recycle a scratch buffer that has
  `b_localdir`.
- After :new/:vnew/:tabnew the CWD sticks to previous buffer's
  `b_localdir` even though the new curbuf has none, so :new is not
  equivalent to ":split | enew", and getcwd() disagrees with
  haslocaldir().
- Requires "which buffer spawned this buffer" semantics that no other
  buffer-local state has.

Solution:
Drop sticky/inherit behavior of buffer-local CWD (:bcd).

- do_ecmd: always apply the new curbuf's dir (`fix_current_dir`), like
  `do_autochdir` already does. :tabnew from a :bcd buffer now reverts to
  global CWD (and fires DirChanged), same as :tabnew from a :lcd window.
- curbuf_reusable(): recycling a scratch buffer frees its b_localdir.

To get sticky/inherit behavior of CWD, use `:lcd`.
2026-08-04 20:48:44 +02:00
Justin M. Keyes
46ca236525 fix(cwd): validate getcwd(…, -1) 2026-08-04 20:48:44 +02:00
Justin M. Keyes
db2e86fba4 refactor(editor): cleanup change-directory (:bcd) logic 2026-08-04 20:48:05 +02:00
saher
ea3868bcf9 feat(editor): :bcd changes buffer-local directory
Problem:
No way to set a buffer-local directory.
Use-cases:
- "Root dir" for LSP (and the "project" concept).
- `:terminal` OSC 7

Solution:
Add `:bcd` command.

- Extend `getcwd()` to take a third arg; `getcwd(-1, -1, bunfr)` returns
  the buffer-local working directory.
- Buffer-local directories have less priority than window-local
  ones, and more priority than tab-local ones.

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2026-08-04 20:09:48 +02:00
Justin M. Keyes
9c5afe6606 test: unreliable "nvim.zip … incorrect password" #41159
Problem:

    FAILED   …/plugin/zip_spec.lua @ 442: nvim.zip reports an incorrect archive password
    Expected values to be equal.
    Expected:
    true
    Actual:
    false
    stack traceback:
    …/plugin/zip_spec.lua:453: in function <…/plugin/zip_spec.lua:442>

Solution:
The message is scheduled, so poll for it.
2026-08-04 18:00:13 +00:00
not_compiled
f6de99d028 fix(highlight): make Ignore hidden by default #41115
Problem:
Ignore is linked to Normal by default, making the text visible instead
of hidden.

Solution:
Replace the default link with an explicit highlight definition using
ctermfg=0 guifg=bg.
2026-08-04 13:43:22 -04:00
Justin M. Keyes
ceccca7780 fix(options): crash on ":let &l:autoread = v:true" #41158
Problem:
Assigning to the local value of a global-local boolean option
('autoread', 'autocomplete', 'fsync') aborts:

    Assertion failed: (curval.type == newval.type), function
    ex_let_option, file vars.c, line 1408.

    ex_let_one
    ex_let_vars
    ex_let
    execute_cmd0
    do_cmdline
    call_user_func
    ...
    eval_map_expr
    vgetorpeek
    vgetc
    state_enter
    main

A global-local option may have local value `kObjectTypeUnset`, but
`ex_let_option()` guards only `kObjectTypeNil`.

Solution:
When curval is Unset, resolve it to the inherited global value.
2026-08-04 13:28:26 -04:00
Justin M. Keyes
597555ebc0 fix(options): crash on ":let &t_Co = v:true" #41152
Problem:
Assigning a Boolean or special value (v:true/v:false/v:null/v:none) to a TTY
option aborts:

    Assertion failed: (curval.type == newval.type), function ex_let_option, file vars.c, line 1408.
    3   libsystem_c.dylib   __assert_rtn + 284
    4   nvim                ex_let_one + 3308
    5   nvim                ex_let_vars + 112
    6   nvim                ex_let + 2356
    7   nvim                execute_cmd0 + 252
    8   nvim                do_cmdline + 9076
    9   nvim                call_user_func + 3320
    10  nvim                call_func + 2076
    11  nvim                get_func_tv + 696
    12  nvim                eval_func + 380
    20  nvim                eval_to_string_eap + 276
    21  nvim                eval_map_expr + 444
    22  nvim                vgetorpeek + 3172
    23  nvim                vgetc + 764

Solution:
Apply the string-type check to TTY options too, so a Boolean/special value
gives "E928: String required" instead of aborting. Valid string/number
assignments to `t_*` pseudo-options still silently no-op.
2026-08-04 11:06:47 +00:00
Justin M. Keyes
dab5fab948 Merge #41114 from epithet/default-ruler-as-expression 2026-08-04 06:51:34 -04:00
Justin M. Keyes
8589447159 feat(detach): opt-in to "server keeps running" #41133
Problem:
By default, `nvim` does not survive if its host terminal dies. This is
inconvenient if you want to use Nvim as a "session manager" (like tmux).

Solution:
Let users opt-in to the "survive" behavior via `:detach!` (bang "!").
This marks the current UI as "detachable", so the server will not
self-exit if the UI channel closes.
2026-08-04 06:20:16 -04:00
Sébastien Hoffmann
ca07e505f9 refactor(ruler)!: replace C implementation with 'rulerformat' expression
Problem:
The default 'ruler' is implemented in C instead of the 'statusline' DSL.

Solution:
Replace the C implementation with a default 'rulerformat' expression.
This is a continuation of #1248 and #33036.

Advantages:
- configuration is more discoverable, the default being a useful example
- users and plugins can augment the default
- code reuse and less C code to maintain
- ui2: due to the use of an item group with `minwid`, it can expand
  instead of truncating when the content gets too long, which is
  particularly useful for locales with long translations of Top/Bot/All

Implementation details:
As is the case for 'statusline', when trying to set 'rulerformat' to an
empty string, the default expression is restored instead, mimicking how
previously the default C implementation would have been activated.
Just like before, `:set rulerformat=` and `:set rulerformat&` have the
same effect, and the ruler is disabled with `:set noruler`.

The default expression uses an item group with `%=`, unlike the fallback
in the previous default statusline `%-14.(%l,%c%V%) %P`, because the
total width and how it is configured is immediately clear without
documentation, it is a more useful pattern in general that works when
both sides have flexible width, and it also works for vim, which is
useful for configuration sharing/reuse.

A truncation marker `%<` is added at the end to mimic how at small
screen widths, the scroll percentage would disappear first, so that the
cursor position can remain fully visible.

BREAKING CHANGES:
- `&rulerformat` can no longer be set to an empty string
- ui2: the default ruler is no longer of fixed width, but can expand
- at very small screen widths (< 36 columns)
  - ui2: it will no longer try to shrink white-space before truncating
  - it truncates gradually from the right, whereas previously, the
    scroll percentage would disappear all at once
- l10n can no longer add a space after the comma between line and column
  (this was only done for one language: Ukrainian)
2026-08-04 12:12:23 +02:00
Rocco Vaccone
d0644230f1 fix(lsp): ignore (and log once) invalid documentSelector globs #41055
Problem:
Client:_get_registrations() errors if a documentSelector pattern is not
a valid glob (e.g. "**/**.dart" from dartls). The error discards
already-matched registrations and propagates to supports_method() and
the client/registerCapability handler, disabling capabilities unrelated
to the offending pattern.

Solution:
Skip invalid globs. Treat them as non-matching, and log once per client.

(Similar approach was taken for filewatcher globs: 4d9e5acfb5)
2026-08-04 05:14:15 -04:00
Justin M. Keyes
c875b16714 Merge #41112 from erdivartanovich/dir-failed-open-recovery 2026-08-04 05:04:07 -04:00
zeertzjq
30b4c1b40d fix(ctx): missing options copy when loading hidden buffer #41149
It's necessary to copy the global 'fileencoding' to the buffer-local
value before entering the buffer, otherwise 'fileencoding' is changed
when reading the file, which will mark the file as modified.
2026-08-04 04:50:36 -04:00
Sébastien Hoffmann
259e6fa9cc fix(ruler)!: consistent width in last line and statusline
Problem: Traditionally, the ruler in the last line is one cell shorter
than in the statusline, leaving the last cell of the screen blank.
According to code comments, this is in order to prevent unwanted
scrolling on "some" (unspecified, but presumably ancient) terminals.
Berkeley vi is more specific in its `vs_modeline` function: dumb
terminals with hardware scroll, SunOS 4.1.1 and Ultrix 4.2 curses.
(n)curses still has a similar limitation in `(w)addstr`, but apparently
only for historical reasons.

Maintaining the different widths leads to awkward inconsistencies when
the ruler is configured with 'rulerformat', except for the special case
where it contains a top-level `%=`. Shifting the ruler in the last line
to the left would be a solution, but the empty cell at the end doesn't
seem to be relevant anymore.

Solution: extend the ruler in the last line all the way to the right
edge of the screen, just like in the statusline. The exact same amount
of place will be available to the rest of the UI as before.

BREAKING CHANGE:
- the default ruler width is now 18 cells
- the last cell of the screen is no longer empty

Closes #41076
2026-08-04 06:36:58 +02:00
Sébastien Hoffmann
81261804a8 fix(ruler): always clear ruler when disabled
Problem: the ruler is not cleared in the following circumstances:
- ui1 is running
- 'rulerformat' is configured
- the default ruler was not previously visible in the last line, for
  example because 'rulerformat' is configured in init.lua
- 'ruler' is disabled without using the command-line, for example via
  key-binding (entering the command-line would clear the ruler)

The corresponding test case did not fail because 'rulerformat' was set
while the default ruler was shown.

Solution: use a dedicated variable for tracking whether the ui1 ruler
was previously shown in the last line. `did_ruler_col` is now only used
for setting `msg_col`, which is not implemented in the case where
'rulerformat' is configured.

Reorder the test code to make the individual checks more independent
from each other, and to reflect the future where 'rulerformat' will
never be empty. Note that the check where 'rulerformat' was configured
relied on the default ruler not being cleared and a stale "0," still
being shown in front of the new ruler - this is also fixed with ui2.
2026-08-04 06:36:58 +02:00
Sébastien Hoffmann
dc21aa07f7 fix(ruler): no window-local highlights for last line 'rulerformat'
Fixes #38777 in case 'rulerformat' is set.

See PR 38879. Original message:
Problem:  When the 'ruler' is in the last line of the screen, it takes
          local highlight definitions of the current window, tripping an
          assert (since c1648cf).
Solution: Don't use window-local highlight definitions when the ruler is
          not part of a statusline.
2026-08-04 06:36:57 +02:00
Barrett Ruth
755abbc8d5 fix(zip): only refuse a cwd unzip on Windows 2026-08-03 15:35:30 -05:00
Barrett Ruth
886a270e7f refactor(zip)!: address entries with zip:// paths
Problem:
`zipfile://{archive}::{entry}` is ambiguous: `::` is legal in both an
archive path and an entry path, so the separator cannot be identified.
Splitting at the last `::` reads archives correctly but breaks entries
that contain it, and the plugin then emits buffer names it cannot read
back.

Solution:
Address entries as `zip://{archive}/{entry}`, joining the two paths.
Resolve the split by walking components: the first one that is a regular
file is the archive, because a regular file cannot have children on disk.
Entry paths may then contain any character, and no escaping is needed.

zipPlugin.vim keeps its own scheme, so the Java ftplugin emits whichever
form matches the active plugin until the legacy package is removed.
2026-08-03 15:22:25 -05:00