Commit Graph
6293 Commits
Author SHA1 Message Date
1grzyb1 0f2d81233d VIM-2342 Add cnext to jump to next item in quickfix list
Ggrep works based on quickfix list and we didn't have implementation of that so we need to support it first
2026-10-26 09:41:18 +01:00
1grzyb1 78b82c395f VIM-2342 Add fugitive extension with grep command 2026-10-26 09:41:18 +01:00
IdeaVim Bot 5c6eca9034 Update help file 2026-10-21 10:04:26 +00:00
1grzyb1 0473fe0479 fix(VIM-2200): Keep the output of a command run from the command-line window
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.
2026-10-21 12:01:59 +02:00
1grzyb1 8a183c5159 VIM-2200 Open the command-line window with <C-F> from the command line
Editing a long command or search pattern is easier with Normal mode motions than in the one-line command line.
2026-10-21 12:01:59 +02:00
1grzyb1 516d384836 VIM-4269 speed search on popups with nerdtree
`/` action was running intelij SpeedSearch which didin;t work on popups. to make it work there also we find speedsearch component and activate this one directly
2026-10-20 09:56:52 +00:00
claude[bot]andClaude Opus 5.5 3c5cf41531 Unregister ToolWindowNav shortcut on dispose and hidden tool windows
ToolWindowNavEverywhere registered the <C-W> dispatcher on the focused tool
window component but never removed it from that component on dispose. After
disposing, the focus listener was gone too, so <C-W> stayed captured there.

The old focus owner was also unregistered only if it was still inside a
visible tool window. A tool window hidden while focused kept the shortcut.

Track the registered component, as EscEverywhere does, and unregister it on
every focus change and on dispose.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 08:53:30 +00:00
grzybek 1be3fc7af0 VIM-3113 support autoselect option
Add possibility to disable pushing to primary register on selction change. Needed to disable platform primary publishing so mouse selection won't publish too.
2026-10-20 08:25:04 +00:00
grzybek f03d41e2fc VIM-1309 Don't move caret on middle paste in x11 2026-10-20 07:32:23 +00:00
1grzyb1 d22e60e129 VIM-2374 I and A move to begginig/end of multi selection 2026-10-19 10:15:46 +00:00
Matt Ellis 50229dcc3b Fix incorrect langmap when replaying failed map 2026-10-19 07:39:55 +00:00
1grzyb1 ee84325048 VIM-4329 restructure scrolling the caret into view
Decide between centring, scrolling up and scrolling down in one place, and keep how we measure the window, in lines or in pixels when block inlays take up most of it, in WindowLines
2026-10-16 11:58:14 +02:00
1grzyb1 1d78f779b2 VIM-4329 convert EditorHelper to Kotlin
Move the existing EditorHelper.kt top level functions to EditorHelperRt.kt, matching its JVM name, and group the scrolling code that adjusts for the sticky lines panel
2026-10-16 11:58:14 +02:00
1grzyb1 dbcb2187e6 VIM-3301 don't hide caret under sticky lines when scrolling up
Scrolling a line to the top of the screen can make the sticky lines panel taller, which hides the line. Scroll again for the new panel
2026-10-16 11:58:14 +02:00
1grzyb1 6a8d26d6b5 VIM-4329 keep scrolloff at top of screen with block inlays
When block inlays made the line count unreliable, scrolloff was only applied at the bottom of the screen, so the caret could reach the top line
2026-10-16 11:58:14 +02:00
1grzyb1 0784623421 VIM-4329 test scrolling with block inlays taking most of the screen
Cover scrolling up, down and below the screen when block inlays make the visible line count unreliable
2026-10-16 11:58:14 +02:00
1grzyb1 99ff550695 VIM-4329 fix scrolloff=999 behavior with cc
Don't scroll when moving cursor on cc
2026-10-16 11:58:14 +02:00
1grzyb1 44e38b0c5f VIM-4329 fix scrolloff=999 behavior with sticky lines 2026-10-16 11:58:14 +02:00
1grzyb1 c259d64079 VIM-4329 fix scrolloff=999 behavior with doc comments 2026-10-16 11:58:14 +02:00
1grzyb1 f1351f0efe VIM-4343 map key events as keystrokes
Other components were taking mapped actions as keystrokes before our dispatcher so we have to register them as keystrokes also
2026-10-15 15:24:59 +02:00
1grzyb1 a24e2939b8 VIM-4343 Don't add esc to all mappings 2026-10-15 15:24:59 +02:00
1grzyb1 4328ec17da VIM-4343 Don't register shortcuts on modal contexts 2026-10-15 15:24:59 +02:00
1grzyb1 b8f9ad7892 VIM-4228 Postpone caret movement after rider action 2026-10-14 16:28:42 +02:00
1grzyb1 713a61e362 Redraw panel only on current document changes
Without that even some random intelij change of gitignroe could redraw our panel what made Large file tests flaky
2026-10-14 11:50:01 +02:00
AndDe-gourav bb18bb5356 fix none selction on toggling visual form select mode on empty line and test for supporting selecting new line char 2026-10-14 08:31:08 +02:00
AndDe-gourav 2201617e81 join tests and passes deleteJoinRange an exculsive range 2026-10-14 08:31:08 +02:00
AndDe-gourav fe78002de0 fixed caret resting on new line char 2026-10-14 08:31:08 +02:00
AndDe-gourav 6cedadc455 vim-paragraph-motion test fix and other selection test fix 2026-10-14 08:31:08 +02:00
AndDe-gourav ee77c6de90 updated exchange test that include new line char
# Conflicts:
#	src/test/java/org/jetbrains/plugins/ideavim/extension/exchange/VimExchangeExtensionTest.kt
#	src/test/java/org/jetbrains/plugins/ideavim/extension/exchange/VimExchangeWithClipboardTest.kt
2026-10-14 08:31:08 +02:00
AndDe-gourav 3fdb747969 remove todo comment of not selecting new line char 2026-10-14 08:31:08 +02:00
AndDe-gourav f4272fe350 fix 'D' on empty(only new line char) visual line 2026-10-14 08:31:08 +02:00
AndDe-gourav 8b97cd8bed remove restriction not selecting new line char 2026-10-14 08:31:08 +02:00
1grzyb1 2d72b1f083 Restart clear output panel timer on change
Each n after search didn't restart timer so after 10s output panel was closed. It broke new Large file tests this way.
2026-10-13 15:41:38 +02:00
claude[bot]andClaude Opus 5.5 7cccaaa814 Support "?" as search history name in history functions
Vim's `:help hist-names` lists "?" alongside "/" as an alias for the
search history, but getTypeByString only recognised "/". As a result,
histadd('?', ...), histdel('?'), histget('?') and histnr('?') failed
instead of operating on the search history.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 12:36:15 +02:00
1grzyb1 06778f5380 Generate ideavim_extensions.json only in root module 2026-10-13 12:16:43 +02:00
1grzyb1 738b73417f Load intellij.platform.rpc dependency from an optional module
intellij.platform.rpc doesn't exist in 2025.3, is embedded in the core
classloader in 2026.1-2026.2 and is a standalone module since 2026.3.
Declaring it as a dependency of the embedded ideavim-common module disables
the whole plugin on 2025.3 and breaks the 2025.3 build.

Move the dependency to a new optional ideavim-rpc module that provides
VimRemoteApiResolver via the IdeaVIM.remoteApiResolver extension point.
When the module is skipped (2025.3), fall back to calling
RemoteApiProviderService from the core classloader.
2026-10-13 12:16:43 +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 9e142d4401 VIM-1975 implement clever-f extension 2026-10-12 12:06:01 +02:00
grzybek 55549efd72 Remove in in notification massage 2026-10-12 08:55:50 +02:00
claude[bot]andClaude Opus 5.5 644f9cf628 Fix: IndexOutOfBoundsException on % in an empty document
findMatchingPairOnCurrentLine read the character at the caret offset
without checking that the current line has any characters. On an empty
document this indexed past the end of the text. An empty line has no
pair characters to match, so return no match there, as Vim does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 12:30:02 +02:00
claude[bot]andClaude Opus 5 1e46befc77 Keep replaceText character-wise for partial line ranges
determineSelectionType classified every range spanning more than one line as
line-wise. replaceText then built a line-wise VimSelection from it, which
expands to whole lines, so the text before startOffset on the first line and
after endOffset on the last one was silently discarded.

    // "one two three\nfour five six\nseven eight"
    replaceText(8, 18, "XXX")   // "three\nfour"
    // was:      "XXX\nseven eight"
    // expected: "one two XXX five six\nseven eight"

A multi-line range is now line-wise only when it actually covers those lines
completely, which is what ReplaceWithRegister's `2grr` needs; anything that
starts or ends mid-line stays character-wise and replaces exactly the
requested range.

This also drops the `isLine` check that the old code computed but could never
observe as true: it required the range to end with a line break while start
and end sat on the same line, and it was only consulted on the
startLine == endLine branch, where that cannot hold.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-09 12:18:29 +02:00
claude[bot]andClaude Opus 5 3058a337d4 Honour allowEnd in CaretTransaction's getLineEndOffset
CaretTransactionImpl declared its own getLineStartOffset, getLineEndOffset
and getLine, duplicating the implementations it already inherits through
`EditorAccessor by EditorAccessorImpl(projectId)`. The copies had drifted:
getLineEndOffset dropped the allowEnd argument and always called the
single-argument VimEditor.getLineEndOffset, so it behaved as allowEnd = true
regardless of what the caller asked for.

The visible effect is that the same EditorAccessor function disagrees with
itself depending on how deeply it is nested:

    change {
      getLineEndOffset(line, allowEnd = false)                  // last character
      withPrimaryCaret { getLineEndOffset(line, allowEnd = false) }  // line break
    }

ReadScopeImpl and TransactionImpl both rely on the delegate, so dropping the
three redundant overrides fixes the argument handling and removes the
duplication that let them drift apart in the first place.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-09 12:18:29 +02:00
IdeaVim Bot 1d34cc3206 Update help file 2026-10-09 09:43:09 +00:00
claude[bot]andClaude Opus 5 f90bc0bca6 Fix: cmdwin editor was never Vim initialised, so its buffer local options were missing
`isCommandHistoryWindow` used `Editor.getVirtualFile()`, which is not necessarily
populated while the editor is still being created - and that is exactly when it is
called, from `isAllowedFileEditor` via `vimDisabled`, to decide whether an editor
should be initialised. The command-line window opened by `q:`, `q/` and `q?` was
therefore classified as a non-Vim editor and `EditorListeners.add` never ran, so its
buffer never got its local option values.

Search count and search highlights are computed for the selected editor and for every
open editor, so searching for a pattern containing `\<` asked the cmdwin buffer for its
local 'iskeyword' and threw "Unexpected uninitialised buffer local value: iskeyword".

Resolve the file from the document instead, as every other check in `EditorHelper`
already does.

Found by the RandomActionsPropertyTest property tests.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-09 11:40:31 +02:00
claude[bot]andClaude Opus 5 f686ed5911 Add tests for exclusive and inclusive slice end indices
`SliceFunctionTest` covered negative and out-of-range end indices, but
not an end index that resolves to zero, which is the boundary where the
exclusive end index of `slice()` and the inclusive end index of a sublist
expression disagree. Verified against the previous implementation: the
`end index of zero` cases fail (returning the whole collection), and the
negative cases that resolve to zero or below already passed.

Also pin the sublist side of that boundary: an explicit `-1` end index,
`-length` (first item only), and `-length - 1` (empty). These passed
before, and guard the shared `VimList.slice`/`VimString.substring`
against a regression in the other direction.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-09 10:46:17 +02:00
claude[bot]andClaude Opus 5.5 1a2cc3c401 Fix :tags failing when the line jumped from was deleted
Tag stack entries keep the line number they were recorded with and are not
adjusted on edits. When that line no longer exists, :tags called
getLineText() with an out-of-range line and failed with
"Incorrect line: N, out of M". Show empty text for such entries instead.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-09 10:40:55 +02:00
claude[bot]andClaude Opus 5.5 5e6c95c187 Fix: crash on empty search range such as :/ or :?
A search range consisting of a single delimiter made SearchAddress call
substring(1, 0), throwing StringIndexOutOfBoundsException. An empty
pattern now uses the last search pattern, as in Vim, and reports E35
when there is none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 10:39:32 +02:00
claude[bot]andClaude Opus 5.5 c78d2f326c Fix infinite loop on :continue inside :for over a List
In ForLoop (List iterable) and ForLoopWithList, the Continue branch used
Kotlin's `continue`, which jumped back to the `while` condition and
skipped `index += 1`. As a result `for x in [1, 2] | continue | endfor`
never terminated. Fall through to the increment instead.

Add regression tests for continue/break when iterating over lists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 10:30:23 +02:00
valisandClaude Opus 5.5 c11a903c5b Don't treat quotes inside non-string tokens as string delimiters in %
The text-based quote detection used by % treats any two quote characters
on a line as a string. In languages where quotes can be part of other
tokens (e.g., identifiers with primes like `f'` in Haskell-like languages),
brackets between such quotes were skipped, and % jumped to a wrong
bracket or did not move at all.

If PSI is available, check that the opening quote starts a token and the
closing quote ends a token. Plain text and comments keep the text-based
behaviour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 10:29:15 +02:00
Matt Ellis ac52d3a0e4 Handle incomplete function definition command 2026-10-09 10:16:30 +02:00