`insertText` declared a local `offset` that shadowed its own `offset`
parameter, leaving the parameter unused and the body reaching for
`commandLine.caret.offset` instead. The two are the same value (that is what
the base class passes), so this is not a behaviour change — but the shadowing
hides the parameter and makes the function harder to read.
Name the local after what it holds, and use the parameter.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`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>
`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>
`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>
`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>
Moves the Area field agent from the JetBrains/vim-claude-robot repository
into this one, where the YouTrack tooling and the Claude proxy setup
already exist.
The previous agent passed a single prompt to `claude -p` with the ticket
summary, the ticket description, and the list of Area values. It had no
tools, so it could not read the ticket comments, see how an Area value is
used on other tickets, or look at the source. The new workflow runs an
agent that reads the ticket, searches comparable tickets when the right
value is not obvious, and greps the code when the ticket names a command
or an option.
A script selects the ticket, so a run with nothing to triage ends before
the agent starts.
Add to the YouTrack tools:
- searchTickets, which reports the Area values of the tickets it finds
- getAreaValues and setArea, which reject unknown value names before
writing and verify the field afterwards
- setTagByName, so a tag no longer needs a hardcoded id
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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
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.
Now depending on windowjumps option we store jumplist based on window or whole project. this enables stroing diffrent jump history for each split window
The tbr page was still a byte-for-byte copy of the 2.45.0 release notes,
so its content is replaced with the features and fixes currently under
To Be Released: the YankRing extension, modeless selection, the
current-search-match highlight, :stopinsert, command-line sethandler and
the macOS key repeat setting, plus the polish & fixes list.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
normal lost the newline and everything after it when the argument came from an :execute string (:exe "normal! iX\<CR>Y" typed only X), because \<CR> was parsed into a line feed instead of a carriage return and a line feed ends the ex command line; fixed by making \<CR> produce 0x0D, recognising <NL> as the <C-J> key, and having :execute hand line feeds to the parser as carriage returns for commands like :normal that take the rest of the line.
With VimEverywhere enabled, TableEverywhere left its navigation shortcuts registered on a table while focus moved into that table's own cell editor, so shifted keys such as `G` and `$` were consumed as selectLastRow/selectLastColumn instead of being typed (e.g. the Name field of the Environment Variables dialog) - the dispatcher now stands down whenever a cell editor is active, and leaving a table always unregisters the shortcuts and restores `autoStartsEdit`