Commit Graph
44 Commits
Author SHA1 Message Date
1grzyb1 6650aef408 VIM-4370 Undo one IdeaVim command at a time in Rider split mode
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.
2026-11-09 10:59:04 +01:00
1grzyb1 6ac10969b2 VIM-4371 Restore the clipboard after ideaput on the split-mode frontend
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.
2026-11-06 11:12:39 +01:00
1grzyb1 97f49ed06b VIM-4351 Set a git identity for the commit in DiffJumpSplitTest
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.
2026-11-03 11:31:45 +01:00
1grzyb1 39e065bb1f VIM-4351 Bring back the diff editor after Go to Declaration of the IDE
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.
2026-11-02 10:56:07 +01:00
1grzyb1 e3c95eb14b Fix(VIM-4351): Bring back the diff editor with <C-O> in split mode
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.
2026-11-02 10:56:07 +01:00
1grzyb1 398b161704 Wait for rpc modal input before next keystrokes
When rpc call was made and it showed modal dialog keystroke were lost during that time
2026-10-13 15:41:38 +02:00
1grzyb1 bd0f361afa VIM-4341 Run search count on background thread
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
2026-10-13 10:37:34 +02:00
1grzyb1 1e3c671c0c VIM-2524 calculate indent after cc
set proper indent after performing cc. previously we were just using that was already set not from code style
2026-10-09 09:49:32 +02:00
1grzyb1 6f48fd9903 Complete action command ideavimrc file 2026-10-05 12:04:26 +02:00
Grzybek d99f46937f VIM-1153 replay all keystrokes during . (#2088)
* 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
2026-09-29 10:31:40 +00:00
1grzyb1 fafc5d25a4 Add idea prefix to custom options
To not confuse our internal options with vim ones we've added idea prefix to all of them
Old names will still work as deprecated names
2026-09-03 09:03:23 +02:00
1grzyb1 5ee595aac4 VIM-3058 alternate file name register 2026-08-27 09:19:18 +02:00
1grzyb1 b7219ff413 VIM-1266 file name from percent register
Implement % register that returns current file name
2026-08-21 08:49:52 +02:00
1grzyb1 7b9b921cbd VIM-2168 split mode tests for window jumps 2026-08-19 13:30:24 +02:00
1grzyb1 c15110ec25 Fix spellchecker for split mode 2026-07-29 13:40:36 +02:00
dependabot[bot] 147334ca43 Bump org.kodein.di:kodein-di-jvm from 7.32.0 to 7.33.0
Bumps [org.kodein.di:kodein-di-jvm](https://github.com/kosi-libs/Kodein) from 7.32.0 to 7.33.0.
- [Release notes](https://github.com/kosi-libs/Kodein/releases)
- [Changelog](https://github.com/kosi-libs/Kodein/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kosi-libs/Kodein/compare/v7.32.0...v7.33.0)

---
updated-dependencies:
- dependency-name: org.kodein.di:kodein-di-jvm
  dependency-version: 7.33.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-22 15:40:46 +00:00
dependabot[bot] 7ac369c630 Bump org.kodein.di:kodein-di-jvm from 7.31.0 to 7.32.0
Bumps [org.kodein.di:kodein-di-jvm](https://github.com/kosi-libs/Kodein) from 7.31.0 to 7.32.0.
- [Release notes](https://github.com/kosi-libs/Kodein/releases)
- [Changelog](https://github.com/kosi-libs/Kodein/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kosi-libs/Kodein/compare/v7.31.0...v7.32.0)

---
updated-dependencies:
- dependency-name: org.kodein.di:kodein-di-jvm
  dependency-version: 7.32.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-27 18:13:33 +00:00
1grzyb1 14e7cfe0e7 VIM-4245 Fix repeat-insert undo grouping so one u reverts one logical change
Wrap the undo-mark only when there's actual replay work (count > 1,  block insert, or dot-repeat) — otherwise the always-fired wrap on plain `iHi<Esc>` emitted an empty mark group that swallowed the first `u`.
2026-05-22 09:41:25 +00:00
1grzyb1 95128f407b VIM-4235 use native saveFile action in :w
using FilerometeApi didn't trigger reformat on save action in splitmode/rider so I chagned it to native action execution in on save
2026-05-22 08:42:52 +00:00
1grzyb1andClaude Opus 4.7 6366fa23db VIM-4234 Restore IntelliJ 2026.1 for split-mode tests
The VIM-4234 rollback dropped both Java 25→21 *and* ideaVersion 2026.1→2025.3
because Java 25 was incompatible with the platform. The Java rollback was the
necessary fix; the IDE-version rollback was a side change that broke 3
split-mode tests due to 2025.3 JBC regressions in speculative undo and
`IdeDocumentHistoryImpl.RecentPlacesListener.isChanged`.

Java 21 + IntelliJ 2026.1 is the prior known-working combination
(`Ideavim_IdeaVimTests_2026_1` build config has been green on master), so
restoring it here gets all 24 split-mode tests passing again. Verified
locally and on TeamCity personal build #16791.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 06:39:44 +00:00
1grzyb1 b82640018a Fix split mode tests 2026-05-20 10:23:29 +00:00
1grzyb1 108de3d0d1 VIM-4234 Use 2025.3 in split mode tests 2026-05-15 11:34:27 +00:00
1grzyb1 5d6622b77e Use only jbr cache repository 2026-05-13 09:48:47 +00:00
1grzyb1 2b4a4eeff4 Add jbr cache repo per module 2026-05-13 08:45:11 +00:00
1grzyb1 4225b32f55 Update java to version 25 2026-05-12 11:34:21 +00:00
AndDe-gourav 304484714a Add tests for :edit file creation (VIM-266)
# Conflicts:
#	src/test/java/org/jetbrains/plugins/ideavim/ex/implementation/commands/EditFileCreateTest.kt
#	tests/split-mode-tests/src/test/kotlin/com/maddyhome/idea/vim/split/EditFileCreateSplitTest.kt
2026-05-11 06:36:04 +00:00
Alex PlateandClaude Opus 4.7 408db2c513 Inline IdeInfo in split-mode-tests to handle 262 EAP API change
The 262 EAP refactored ide-starter (commit aa3d516047 in
intellij-community, "AT-2967 Compile time dependency on dedicated
IDE info"): IdeProductProvider was removed, and per-IDE info now
lives in dedicated modules accessed via IdeInfo.Companion.IdeaUltimate.

Constructing IdeInfo directly is the only form that compiles on
both 261 (default ideaVersion=2026.1) and 262 (LATEST-EAP-SNAPSHOT),
since the IdeInfo data-class signature is unchanged across the
refactor. Values mirror DefaultIdeaUltimate from the new
intellij.tools.ide.starter.product.idea.ultimate module.

This unblocks :tests:split-mode-tests:compileTestKotlin on the
Latest EAP TeamCity build, which was failing with "Unresolved
reference 'IdeProductProvider'".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 17:00:02 +03:00
1grzyb1 5bb18a2cb7 feat(VIM-519): cycle through recent edits with g; and g,
Implements g; and g, to walk through the per-buffer change list, mirroring Neovim's b_changelist semantics. The list is fed by the backend's RecentPlacesListener over an RPC topic (the same pattern as the existing jump service), so it works in both monolith and split mode.
2026-05-06 08:37:14 +02:00
1grzyb1 7ec1e4c58d VIM-4202 Fix state after commentary action
in split mode/clion/ rider, after the comment action runs on rpc, it happens after removing selection. To fix that, we execute handler directly in synchronous way
2026-04-21 10:21:29 +02:00
1grzyb1 08aea2b202 Split mode test for simple undo insert 2026-04-15 10:14:13 +02:00
1grzyb1 c82539e379 Remove manual DriverRunner registration 2026-04-10 09:59:25 +02:00
1grzyb1 2fdf52d305 Split double undo into two singles once 2026-04-08 09:24:14 +02:00
1grzyb1 1e489e2c14 Wait for ideavim to attatch to editor 2026-04-08 08:44:16 +02:00
1grzyb1 06d877415d Make go back shortcut platform-specific 2026-04-07 12:52:07 +02:00
1grzyb1 c26658d27d Ensure editor is ready before proceeding with split tests 2026-04-07 10:52:41 +02:00
digitalby 74cf6fbee8 refactor: Extract isGotoAction and saveJumpBeforeGoto helpers, add split-mode test for IDE Back jump 2026-04-07 09:47:42 +02:00
1grzyb1 46823abcda Fix timing in jump navigation split tests 2026-04-03 12:25:19 +02:00
1grzyb1 5a2d982ca5 VIM-3918 Ensure commentary is installed 2026-03-26 11:28:28 +01:00
dependabot[bot] 53f2b4b9af Bump org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm
Bumps [org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm](https://github.com/Kotlin/kotlinx.coroutines) from 1.10.1 to 1.10.2.
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.10.1...1.10.2)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm
  dependency-version: 1.10.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-25 15:56:49 +00:00
dependabot[bot] 7082757b0e Bump org.kodein.di:kodein-di-jvm from 7.20.2 to 7.31.0
Bumps [org.kodein.di:kodein-di-jvm](https://github.com/kosi-libs/Kodein) from 7.20.2 to 7.31.0.
- [Release notes](https://github.com/kosi-libs/Kodein/releases)
- [Changelog](https://github.com/kosi-libs/Kodein/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kosi-libs/Kodein/compare/7.20.2...v7.31.0)

---
updated-dependencies:
- dependency-name: org.kodein.di:kodein-di-jvm
  dependency-version: 7.31.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-25 15:39:41 +00:00
1grzyb1 c01a38d584 VIM-3918 Add split-mode tests for jump navigation 2026-03-25 11:43:43 +01:00
1grzyb1 6c569d9cb3 VIM-3918 Add split-mode tests for file ops, marks, and bookmarks 2026-03-25 11:43:43 +01:00
1grzyb1 c332b010f4 VIM-3918 Add split-mode tests for commentary, repeat, and format undo 2026-03-25 11:43:43 +01:00
1grzyb1 01a7cb4865 VIM-3918 Infrastructure for running split mode tests 2026-03-25 11:43:43 +01:00