Commit Graph
6167 Commits
Author SHA1 Message Date
1grzyb1 a2201f9553 VIM-3667 handle vim shortcuts outside editor 2026-09-04 09:21:32 +02:00
1grzyb1 3ea018a443 VIM-4319 turn off plugin before unload
Plugin was being disposed after services could be removed which resulted in NPE during disposal
2026-09-03 09:25:14 +02: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 6ff4ae1d21 VIM-4308 y highlight the current search match during an incsearch 2026-09-02 11:25:11 +02:00
claude[bot]andClaude Opus 5 05bcee8053 Fix: AssertionError when yanking with a blockwise-forced motion (y<C-V>)
`y<C-V>{motion}` (`:help o_CTRL-V`) makes `getMotionRange` return a
rectangular block, i.e. a multi-range `TextRange` with one range per row
of the block. `YankGroupBase.yankMotion` assumed a single range and
tripped `assert(motionRange.size() == 1)`; with assertions disabled it
silently yanked only the first row of the block, characterwise.

Handle a blockwise-forced motion the way the delete path already does:
store the whole multi-range as a blockwise yank and skip the
characterwise-to-linewise promotion, which does not apply to a block.

Found by the YankDeletePropertyTest property test.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-01 10:47:20 +02:00
claude[bot]andClaude Opus 5 05d766b93f Fix: IndexOutOfBoundsException inserting the filename under the caret at the end of the document
`c_CTRL-R_CTRL-F` uses the *exclusive* end offset of the current incsearch
match as the document offset to look for a filename at. When the match ends
at the very end of the document, that offset equals the text length, and
`findFilenameAtOrFollowingCursor` indexed the text with it directly.

Guard against an offset that isn't a valid index into the text, and return
null, which reports E446 "No file name under cursor". This is the same guard
that `findWordAtOrFollowingCursor` already has, and it matches Vim, which
finds no identifier or filename when the position is past the end of the line.

Found by the property based tests.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-01 10:47:02 +02:00
1grzyb1andClaude Opus 5 22cbe0b1d0 VIM-4314 expand % in ex commands
Expand % signs also during command execution, not only with tab
completion.

% is the buffer name, relative while the file is under a content root;
only :p forces the full path. Expansion runs in a single forward pass
that honours \% and never rescans the expanded name, so a file name
containing % no longer loops forever. :! expands only the file-name
specials and leaves $VAR and ~ to the shell, as Vim does.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-01 09:47:27 +02:00
1grzyb1 a8e199d868 VIM-4314 root and extension % completion 2026-09-01 09:47:27 +02:00
1grzyb1 b47d0b164f VIM-4314 tail % completion 2026-09-01 09:47:27 +02:00
1grzyb1 94c57f23cf VIM-4314 perse % arguments in completion 2026-09-01 09:47:27 +02:00
1grzyb1 74e65e9808 VIM-4314 Expand % in command completion to filename 2026-09-01 09:47:27 +02:00
1grzyb1 33bc6c3fde VIM-4308 Don't update the current search match highlight when no search is active 2026-08-31 10:44:14 +02:00
AndDe-gourav 1c1a634367 test for visualSwapSelection 2026-08-31 10:01:42 +02:00
AndDe-gourav 60eba4c483 fix test related to changeVisualCharacter 2026-08-28 08:29:24 +02:00
1grzyb1 9ad9842f0d Remove end from Vim only editor keys 2026-08-27 10:57:46 +02:00
1grzyb1 81e56413f5 Disable jumps test in splti window
It's flaky will fix later
2026-08-27 10:40:50 +02:00
1grzyb1 5ee595aac4 VIM-3058 alternate file name register 2026-08-27 09:19:18 +02:00
1grzyb1 e0b9cb5def VIM-1370 Fix tag command to last position on stack 2026-08-26 11:01:35 +02:00
1grzyb1 e24188b427 VIM-1370 add tagstack option to disable tagstack 2026-08-26 11:01:35 +02:00
1grzyb1 f8ccadf5a1 VIM-1370 Implement tag command to push to tag stack 2026-08-26 11:01:35 +02:00
1grzyb1andCursor f6a4f77d12 VIM-1370 Implement pop command to pop from tag stack
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 11:01:35 +02:00
1grzyb1 29233c8e83 VIM-1370 Implement tags command to list tags 2026-08-26 11:01:35 +02:00
1grzyb1 ca33c221ce VIM-1370 Implement C-] go to declaration with tag stack 2026-08-26 11:01:35 +02:00
1grzyb1 d34b861aff VIM-1370 ctrl-t to pop from tag stack 2026-08-26 11:01:35 +02:00
1grzyb1 5da968fcbd VIM-1347 VNavigate through marks alphabetically 2026-08-25 11:36:19 +02:00
1grzyb1 70d0660176 VIM-1347 Use all marks for navigation
We should also navigate to global marks not local only
2026-08-25 11:36:19 +02:00
1grzyb1 efb1148707 VIM-1347 Navigate to next/prev marks 2026-08-25 11:36:19 +02:00
1grzyb1 da93281c24 VIM-1347 Add m<Space> command to remove all buffer marks 2026-08-25 11:36:19 +02:00
1grzyb1 c88490efbf VIM-1347 Add m- command to remove line marks 2026-08-25 11:36:19 +02:00
1grzyb1 71ae1a7181 VIM-1347 Add m, command to place next available mark 2026-08-25 11:36:19 +02:00
1grzyb1 a0129d5e44 VIM-1347 Customer bookmark icon with mnemonic support
Render bookmark icons for local marks in Signature extension.
GutterIconRenderer in platform is private so we've had to duplicate this logic
2026-08-25 11:36:19 +02:00
1grzyb1 6ff778148c VIM-1347 Implement signature marks plugin
With this plugin local marks are also shown on toolbar
2026-08-25 11:36:19 +02:00
IdeaVim Bot 4c3f1948cb Preparation to 2.46.2 release 2026-08-24 10:24:02 +00:00
1grzyb1 7517930f48 VIM-4312 correct linewise delete promotion when range end has trailing non-whitespace 2026-08-24 11:03:19 +02:00
1grzyb1 925500ef92 VIM-4312 Option to disbale vim in python console
We've added support for vim in python console but not all users want it so I've added option to disable/enable this feature
2026-08-24 09:35:24 +02:00
claude[bot]andClaude Opus 5 950d60fc63 Fix IndexOutOfBoundsException expanding a word object at the start of the file
`findPreviousWordOne` always steps back one character before it starts
skipping, to avoid getting stuck on the start of a word. When the caller
passes `allowMoveFromWordStart = false`, the character at the new position is
read to decide whether to skip at all — but if the search started at offset 0,
that position is -1 and the read throws.

The only caller that passes `allowMoveFromWordStart = false` is
`findWordObject` when expanding a right-to-left visual selection, so `viw`,
`vaw`, `viW` and `vaW` crashed whenever the selection reached the very start of
the file, e.g. `v h iw` with the caret on the second character.

Return 0 as soon as we step past the start of the text. Every path through the
rest of the function already returns 0 in that case, so this only affects the
out of bounds read.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-21 15:33:46 +03:00
claude[bot]andClaude Opus 5 8c115d092f Report UTF-8 bytes from g8, as Vim does
`g8` is documented as printing "the hex values of the bytes used in the
character under the cursor, assuming it is in UTF-8 encoding". IdeaVim
printed the hex value of a single UTF-16 code unit instead, so anything
outside ASCII was wrong: `é` reported "e9" rather than "c3 a9", and a
character outside the BMP reported half of its surrogate pair ("d83d")
rather than its four UTF-8 bytes.

Encode the full code point at the caret to UTF-8 and format each byte as
two lowercase hex digits, space separated. ASCII output is unchanged.

Vim also appends the bytes of trailing composing characters, separated
by `+`. That is still not implemented, and is noted in the KDoc.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-21 14:38:19 +03:00
claude[bot]andClaude Opus 5 8a4ef315dc Fix g8 crashing when there is no character under the caret
`g8` read `editor.text()[caret.offset]` unguarded. On an empty file, or
with the caret on an empty last line, the offset is the end of the text
and the read threw IndexOutOfBoundsException.

Vim's cursor never sits on the line break - at the end of a line it sits
on the line's terminating NUL - so there is no character under it and
Vim reports "NUL". Do the same, which covers both the crashing offsets
and an empty line in the middle of the file (which previously reported
the hex value of the line feed, "a").

Adds FileGetHexActionTest, which had no coverage at all.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-21 14:38:19 +03:00
claude[bot]andClaude Opus 5 9f78d612f5 Fix(VIM-1341): gx should not add to the jump list
`gx` opens the URL under the caret with an external program and never moves
the caret - the existing `test gx opens the URL without moving the caret`
asserts exactly that. Saving a jump location was therefore pointless and
actively harmful:

- `addJump(reset = true)` pushed the *unchanged* caret position onto the jump
  list and reset the jump spot, so a `<C-O>` right after `gx` landed on the
  caret's own line instead of returning to the previous jump.
- `saveJumpLocation` also overwrites the `'` mark, breaking `''`.
- The action is a `ForEachCaret` handler, so both happened once per caret.

Vim does not list `gx` under `:help jump-motions`, and netrw's `gx`
implementation leaves the jump list alone.

Also drop the `FLAG_SAVE_JUMP` flag: it is only honoured by
`MotionActionHandler`, so on a `VimActionHandler` it was inert and misleading.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-21 14:16:16 +03:00
IdeaVim Bot cafb6b53f1 Preparation to 2.46.1 release 2026-08-21 08:22:56 +00:00
1grzyb1 08343eff68 VIM-4310 Don't show full parser error message 2026-08-21 09:30:56 +02:00
1grzyb1 f45822bce1 VIM-4309 cycle pastes from unnamed register
when user set clipboad to unnamed/unnamedplus yanbkring tried to cycle pases using clipboard register instead of unnamed.
2026-08-21 09:12:53 +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 c2967fa78b VIM-1180 Pass eof to external command
Without that commands like `!sort` would never finish as they waited for user input. This is same way as neovim does. We also don;t support interactive commands
2026-08-20 10:08:27 +02:00
1grzyb1 c947c2d55f VIM-2168 inherit jumplist in every new window, keep focused list on collapse
A new window inherits the list of the window it was created from whichever buffer ends up in it, and copyJumps refreshes the recency order so that a closed window's list cannot win the one-list-per-project pick.
2026-08-19 13:30:24 +02:00
1grzyb1 16e5a06979 VIM-2168 restore jumps saved from disk 2026-08-19 13:30:24 +02:00
1grzyb1 0f8eea1920 VIM-2168 restore jumps when switching windowjumps option 2026-08-19 13:30:24 +02:00
1grzyb1 38c6dabedd VIM-2168 copy jumplist when splitting window 2026-08-19 13:30:24 +02:00
1grzyb1 1ac974e3d1 VIM-2168 store jumps per jumpsListId instead of project
Now depending on windowjumps option we store jumplist based on window or whole project. this enables stroing diffrent jump history for each split window
2026-08-19 13:30:24 +02:00
1grzyb1 781cff8d16 VIM-2168 add windowjumps property
it will manage if jumps should be shared between windows or not
2026-08-19 13:30:24 +02:00