Shifting lines took the current indent width from the editor's logical
column, which expands tabs with the editor's tab size, but built the new
indent with the code style tab size. When those differ (e.g. language
injections, indent detection), each shift added stray spaces after the tabs.
The starter stops the IDE after 10 minutes, and the two sticky lines
tests take about 16 minutes together. The driver connection dropped in
the middle of the second one.
The starter also stops the IDE when any test container finishes, so with
a parameterized test it was gone before @AfterAll. Use two plain tests.
Without RIDER_LICENSE_KEY the client doesn't request a trial by itself,
unlike the monolith. It shows the activation dialog, and the split mode
tests time out after 10 minutes with initializationError.
In Rider, Ctrl+Click and the hotkeys run backend actions through one composite action without an ID, and ReSharper
picks which of them to run, so the action listener never saw Go to Declaration and nothing went onto the tag stack.
When Go to Declaration did show up, e.g. for <C-]>, the backend ran it a second time for the same jump, which pushed
the position twice.
For actions that navigate on the backend, the listener now only marks a tag jump as expected. A composite action
counts as one when the keymap binds its shortcut to a tag action. The position goes onto the stack when ReSharper's
navigation command (NavigationHost.SendNavigation) starts, while the caret is still where the jump starts from. That
pushes once per navigation, and only when one happens. In split mode the JetBrains Client has no Rider modules and
sees Go to Declaration itself, so it keeps pushing before the action.
Only <C-]> pushed onto the tag stack, so Ctrl+Click and the other ways to run Go to Declaration left nothing for <C-T>
to return to: it reported an empty stack or went back to an older <C-]>. The tag stack is now filled by the IDE action
listener for Go to Declaration, Go to Type Declaration and Go to Implementation, however they are invoked: mouse,
shortcut, <Action> mapping, :action, <C-]> and gd.
:tag without an argument redoes a jump that is already on the stack by running Go to Declaration again. It passes
TAG_STACK_PLACE as the action place, which travels with the event even when the action runs asynchronously, so the
listener can skip it. The place goes through a new VimActionExecutor overload to keep the published API compatible.
Rider's ReSharper navigation still isn't covered: the IDE hides the real action behind a composite there.
With `sethandler <Esc> i:ide`, Escape in Insert mode is meant to only close the completion popup. The workaround for
the Rider summary popup exited Insert mode anyway, because it reacts to any Escape that cancels the lookup. It now
leaves the mode alone when the IDE owns Escape in the current mode.
Rider shows a summary popup (the type or the overloads of the selected item) next to the completion popup. In the
JetBrains Client this popup consumes Escape: it lets Escape through only for an autopopup completion, and the client
can't tell that a completion is an autopopup one, because the completion runs on the backend. Escape then closed both
popups and the editor stayed in Insert mode.
The monolithic Rider already has a workaround for the same popup: it remembers whether the last key was Escape and
exits Insert mode when that key cancelled the lookup. It wasn't installed in the client, where isRider() is false, so
it is now installed in any JetBrains Client. The client of IntelliJ never shows this popup, Escape reaches IdeaVim there,
which leaves Insert mode before the lookup is closed, so the listener does nothing.
When the backend sends a summary depends on the state of the project, so the Rider test shows the popup itself, the
way the client does when it receives one.
Rider has no speculative undo, so the undo stack is on the backend. The
backend applies the frontend's changes as undo-transparent patches,
merges all of them into one undo step, and undoes all transparent steps
on top of the stack at once. So one `u` undid every change IdeaVim made
since the backend's own last command, e.g. both deletions after `x x`.
Before each command that follows a change, the frontend now asks the
backend to end the undo step. If the step has only the frontend's
changes, the backend merges a no-op non-transparent action into it first,
so it's undone on its own.
It relies on how the platform merges undo steps, so it's a workaround
until RIDER-145069 is fixed.
A test class can now run Rider as a backend with a JetBrains Client, with
IdeaVim in both, to cover bugs that only show up there. Split mode needs
the 2026.2 Starter, since the 2026.1 one can't connect to a Rider 2026.2
backend, and that Starter needs Java 25. Only Linux: Rider for macOS has
no remote development backend.
- Block inlays and tall lines, e.g. rendered doc comments, are not whole rows, so counting them in rows put the caret in the wrong place.
- The layout and VerticalScroll now work in pixels. scrolloff and scrolljump are still rows and are converted to pixels.
- H, M and L tests check exact positions again, and cover block inlays below methods.
With ideaput the register goes into the clipboard for the IDE paste and is
removed from the clipboard history afterwards. The frontend of split mode uses
FrontendCopyPasteManager, which keeps no history: removeContent() does nothing
and getAllContents() holds only the current system clipboard content, which is
not a TextBlockTransferable. So the removal was never even tried, and the
register text stayed in the system clipboard, replacing what another
application had copied.
Read the previous text from any transferable, and when the clipboard still
holds the register text after the removal, set the previous content back.
H, M and L had no tests with the sticky lines panel or rendered doc comments, which are where the row based model and the platform's own idea of the screen can disagree. The unit test checks every combination of scrolloff, panel height and doc comments over hundreds of positions in a few seconds. The UI test checks a few positions with the real panel and doc comments of Java.
A doc comment is counted as whole rows, a fraction of a row more than it takes, so with doc comments on the screen the tests allow for a row less context. This is visible but small, and not worth counting in pixels for.
The UI tests also close the onboarding of the new UI that a fresh IDE shows, and the incsearch test waits for the scroll of gg to finish before it reads the position. Its check that Esc restores the scroll is disabled: since VIM-2529 Esc only restores the caret, which ends up off the screen.
A scrolloff of around half the window switches to centring once the sticky lines panel takes the window below twice the scrolloff, which is where the panel measured at the old position made h and l scroll. The unit test runs a real panel in a main editor over the scrolloffs around that point and over nested C# blocks, and the Rider test also covers a scrolloff of 20.
The setup of a main editor with a sticky lines panel moves to StickyLinesTestCase, to be shared with other tests.
The scrolling code is about to be restructured, and soft wraps, folds, custom fold regions, inlays taller than the window, inlays below lines, the ideascrollcursor edge cases, the command line and splits had no tests, so a rewrite could change them unnoticed. These tests pin down the current behaviour. Where it is a bug, e.g. zt or CTRL-E not scrolling in the second half of a soft-wrapped file, or the caret scrolling off the screen next to an inlay taller than the window, the test expects the correct result and is disabled.
The UI tests cover what headless tests can't show: the real sticky lines panel, rendered doc comments, the mouse wheel, the command line drawn over the editor, and a split window.
With 'scrolloff' and sticky lines, moving left and right scrolled the
editor back and forth by a line. With smooth scrolling on, the editor
scrolls with an animation that runs after the key is handled, but the
sticky lines panel only follows the editor as it scrolls. So right after
we scrolled, the panel still had the height of where we scrolled from.
Centring the caret line then found the new position perfectly centred
under the old panel and kept it, and on the next key the same happened in
the other direction.
The panel height is now worked out for the position we scroll to, with
the platform code the panel itself uses. It is internal API, used without
a fallback, so that a change in the platform breaks the build instead of
the scrolling.
It also happens in IntelliJ, it depends on where scopes start and end
near the top of the window. Unit tests don't scroll with animation, as the
editor isn't showing, so the test is a Rider UI test.
The CI agents have no git user configured, so the commit in the test
setup failed with "Author identity unknown" and the whole class failed
with an initializationError.
The indent was only worked out where the language has a formatter. Rider has
no formatter for C# on the frontend (formatting lives in the ReSharper
backend), so cc and S left the line with its old indent.
Rider's frontend has a LineIndentProvider that works out the C# indent, but
also a dummy one answering DO_NOT_ADJUST, and CodeStyle.getLineIndent only
asks the first provider of a language. Ask all of them and take the first
indent, and fall back to the formatter only if none of them answers.
Cmd+B and Ctrl+Click run the IDE's Go to Declaration, which IdeaVim doesn't
see, so only the IDE's navigation history records them, mirrored into the
jump list by 'ideaunifyjumps'. The history knows a diff tab only as a
whole, without a caret, so JumpsListener dropped such places.
For a place in an open diff tab, JumpsListener now asks the tab for its
caret on the side the user works in. Navigating away to another file
leaves that caret where it was, so it is the place the IDE recorded.
JumpInfo carries the diff source over RPC. JumpsListener runs on the
backend, where diff tabs live in split mode too.
A removal is not mirrored for a diff tab: its caret says nothing about the
older place the IDE drops.
The tests wait before navigating like the IDE: for a short while after any
jump, the jump list ignores the IDE's navigation, which would otherwise
mirror IdeaVim's own jumps a second time. That window also drops the IDE's
places mirrored from its history, which is left as it is here. The
split-mode test project gets a module with `src` as a source root, so that
Java resolves the declaration.
In split mode the diff tab lives on the backend: the frontend only shows
it, with editors that mirror the backend's ones. IdeaVim runs on the
frontend, so it found no diff tab and fell back to the plain file.
- The diff code moved to ideavim-common, so it runs on both sides, and
uses only the platform: the backend has no IdeaVim injector. The
frontend looks for a local diff tab first (monolith), and otherwise
asks the backend through JumpRemoteApi. The mirrored editors share the
backend editors' EditorId, so the backend finds the real diff editor.
- On the backend, split mode keeps a diff tab in its own file editor
(DiffRequestDirectTransferEditor), which exposes the diff only as a
`processor` property. There is no public API for it, so it is read by
reflection, with the old behaviour as the fallback.
- A write action can't wait for the backend, so a jump recorded during
one stays a plain file jump, as before.
- The left side of a diff from version control has a document with a
LightVirtualFile, so it counted as "in the file": such a jump was saved
across restarts and came back as the plain file at the wrong line.
Only a file on disk counts now. The tests use such a left side too.
Two jump bugs showed up on the way, not specific to diffs:
- <C-O> could stay where the caret already was, when the IDE had already
recorded that place as the newest jump (e.g. after clicking another
file in the Commit tool window). Leaving the newest end of the jump
list now adds the place of the caret first, which replaces the older
jump to it, and then goes back, as Vim does.
- In split mode, jumping to a file that wasn't open didn't place the
caret: selectEditor looked for the frontend editor right after the RPC,
before the frontend has it, so the file opened wherever it was last
left. The backend now opens the file at the position, for jumps, marks,
the tag stack, the change list and quickfix.
Rider gets the state of a backend action (e.g. MoveElementRight or ReformatCode for C#) from the backend only for a real hotkey: when the last shortcut seen by the key dispatcher belongs to the action, it wraps the action into a composite that asks the backend. The synchronous tryToExecute goes through the same hotkey update but never gets there. After `:action` the last shortcut is Enter, so the action isn't wrapped, and after an `<Action>` mapping it is wrapped, but tryToExecuteNow updates the original action instead of the wrapped one. Either way only the frontend answers, it reports the action as disabled, and tryToExecute rejects it. The asynchronous tryToExecute updates the action the way a menu does, with an asynchronous request to the backend, so it gets the real state without blocking the EDT. The action then runs later, so executeAction can't tell whether it succeeded, but the backend's changes arrive later anyway.
The new Rider tests also cover the action cases fixed earlier (VIM-3376, VIM-3826, VIM-3861, VIM-3881) that had no Rider test. ReformatCode from a mapping no longer freezes Rider, so its disabled test is replaced by RiderReformatCodeTest, which runs in its own Rider in case it does again.
The sticky lines panel's height depends on the scroll position, so an exact middle doesn't always exist, and the old tolerance range let the previous position count as centred after every other k; instead, try the middle for each panel height we find and keep the closest position, staying put on a tie unless the caret moved to another line, so moves always scroll but typing never scrolls back and forth.
The platform reports the editor switch from closing the cmdwin only after the command has run, so redrawing for it closed the output the command had just shown.
The driver SDK's SelectionModel has no getSelectedText(Boolean) in 2025.3,
which broke the compilation of the ui-rd-tests module in the 2025.3 and
nvim jobs. Call it through our own remote interface instead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
For large files running search count blocked edt which caused IDE freezes.
Now we first try to quickly show coutn and if we are not able in given threshold move it to other thread and later on update UI accordingly.
Additionally added tests for large files
* VIM-1153 replay all keystrokes during .
we were storing actions and commands to replay during . repeat. Due to that we had to do a lot of strange logic to move cursor after ide chagnes. Becouse of that renaming tag element didn't work.
To make it work and more vim like we store real keystrokes and replay them
* VIM-1153 replay autocomplete
in new mechanism C-Y was working on active lookup and during replay there was no lookup. to fix that we go through action path which adds those keys by itself but we need to drop C-Y from RedoBuffer stack as it's replaved by actruall charachters
* VIM-1153 Fix other lookup actions
* VIM-1153 keep lookup commands as separate ones
Extracted all lookup commands as separate handlers as it was confusing to have seprate paths depending on isActiveLookup in handlers
`didAutoIndent` was set for `o`, `O` and Enter as well as for `cc` and `S`,
so leaving Insert mode without typing anything deleted the indent of a line
that had just been opened.
Vim does delete it, and it does so for an indent computed by 'indentexpr' or
'cindent' too (`fixthisline()` in indent.c). This is a deliberate difference:
in the IDE the indent comes from language support, and a line you have just
opened is expected to stay where it is. `cc` and `S` still follow Vim, since
there the line held text a moment ago and its leftover indent is noise.
Allow to disbale char-ise block comments.
Original plugin doesn't support comment part of line.
Here we add `commentary_block_comments` variable to allow to disable it