Commit Graph
9716 Commits
Author SHA1 Message Date
a9fc2c58a6 Maintenance: IndexedExpression - Fix off-by-one error and variable shadowing
Fixed three issues in IndexedExpression.kt:
1. Off-by-one error: Changed condition from `idx > text.length` to `idx >= text.length` to properly handle boundary cases when indexing strings
2. Redundant evaluation: Reused `indexValue` instead of re-evaluating `index.evaluate()` in the string indexing path
3. Variable shadowing: Renamed local variable from `index` to `indexNum` in `assignToListItem` to avoid shadowing the property

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-17 21:15:47 +03:00
1aa586484f Maintenance: Change actions - Remove wildcard imports
Replace wildcard import `java.util.*` with explicit import `java.util.EnumSet`
in 9 action classes in the change/change package. This improves code clarity
and follows the project's convention of avoiding wildcard imports.

Files updated:
- AutoIndentLinesVisualAction
- ChangeCharactersAction
- ChangeEndOfLineAction
- ChangeLineAction
- ChangeMotionAction
- ChangeVisualLinesAction
- ChangeVisualLinesEndAction
- FilterMotionAction
- ReformatCodeVisualAction

Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-17 12:41:03 +03:00
Alex Plate aa24d53b18 Get rid of the deprecated method in the configuration 2025-10-17 12:39:18 +03:00
Alex Plate c396d98022 Add RandomOrderTests configuration to TeamCity project
Introduce a new build type `RandomOrderTests` for detecting order-dependent bugs. Update project to include the new build type.
2025-10-17 12:38:55 +03:00
Alex Plate db767f534f Remove an unclear test 2025-10-17 12:30:29 +03:00
Alex Plate d955b1b85c Fix an exception that we try to record wrong characters 2025-10-17 12:21:57 +03:00
IdeaVim Bot 0fdfc04068 Add github-actions[bot] to contributors list 2025-10-14 09:01:55 +00:00
244d13a3cc Maintenance: HintGenerator - Fix variable shadowing and remove wildcard import
Fixed a variable shadowing bug in the hint generation logic where the lambda
parameter name 'it' was being shadowed in nested lambda, causing incorrect
logic when checking for hint conflicts. The code now uses explicit parameter
names 'candidateHint' and 'existingHint' to make the logic clear and correct.

Also replaced wildcard import (java.util.*) with explicit import of
WeakHashMap, following project conventions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-14 10:23:36 +03:00
4a2600738f Maintenance: RangeFunctionTest - Fix missing assertion and improve imports
Fixed a missing assertion in the test case "test range negative with start
past end throws error" that was not verifying the error condition actually
occurred. Also cleaned up imports by adding a proper import for assertTrue
instead of using the fully qualified kotlin.test.assertTrue.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-13 18:01:47 +03:00
82ed26a701 Maintenance: PrintLineNumberCommand - Fix out-of-bounds range handling
Add bounds checking to clamp line numbers to the last line of the document,
preventing potential exceptions when accessing line text with out-of-bounds
ranges like `:$+100=`. This matches the behavior of other commands like
GoToLineCommand.

Also add tests to verify the edge case behavior with and without flags.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-13 18:00:49 +03:00
Alex Plate cf5dce3ce7 Remove "getSelectionModel" from VimRegex.kt 2025-10-13 17:37:23 +03:00
Alex Plate c68e216c87 Add copyright year policy to maintenance instructions
Clarify that copyright years should only be updated when making
substantive changes to files, and should not be mentioned in commits.
2025-10-13 16:22:16 +03:00
IdeaVim Bot c12f4a75ac Add github-actions[bot] to contributors list 2025-10-10 09:01:54 +00:00
9a069e5ef8 Maintenance: ExPanelBorder - Update copyright and remove redundant modifier
- Update copyright year from 2023 to 2025
- Remove redundant 'internal constructor()' modifier (already implied by internal class)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-09 15:51:32 +03:00
Alex Plate 27f2e56635 Update codebase maintenance workflow to run daily
Change schedule from weekly (Monday) to daily execution at 6 AM UTC to enable more frequent code quality checks.
2025-10-09 14:26:32 +02:00
Alex Plate 7a0bdb8f3d Add reference to CONTRIBUTING.md in maintenance instructions
Expand the architecture reference to include more details about what contributors can find in CONTRIBUTING.md: architecture overview, testing guidelines, patterns, and awards program information.
2025-10-09 14:16:36 +02:00
Alex Plate 1d9bb6ec70 Expand testing corner cases in contribution guide
Add comprehensive corner case categories for testing Vim commands including position-based, content-based, selection-based, motion-based, buffer state, and boundary conditions to help contributors write more thorough tests.
2025-10-09 14:16:36 +02:00
bb62dcdc15 Maintenance: DeletePreviousWordAction - Update copyright and add test
Update copyright year to 2025 and add test coverage for edge case when
caret is at the beginning of the command line.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-09 15:15:59 +03:00
Alex Plate fdcb954e31 Remove the VimSelectionModel as it's not used anywhere 2025-10-09 13:14:49 +02:00
Alex Plate 747e4053ba Update codebase maintenance workflow to skip PR creation when no changes are made
Previously the workflow instructed Claude to always create a PR even when no
issues were found. This resulted in unnecessary PRs documenting inspections
where no changes were needed.

Now the workflow only creates PRs when actual changes are made to the codebase.
2025-10-09 13:10:41 +02:00
Alex Plate 448c19af47 Fix SortCommand to use caret selection instead of editor selection model
The SortCommand was incorrectly using editor.getSelectionModel() which
returns the editor's global selection model. This is problematic in
multi-caret scenarios where each caret has its own independent selection.

Changed to use caret.hasSelection(), caret.selectionStart, and
caret.selectionEnd directly, which correctly handles per-caret selections.

This also removes the only meaningful usage of VimEditor.getSelectionModel()
in vim-engine, making that interface a candidate for removal in future
cleanup.
2025-10-09 13:09:38 +02:00
Alex Plate f0edc797dc Add codebase maintenance workflow
This workflow enables automated codebase maintenance by randomly selecting
and inspecting parts of the codebase for quality issues, bugs, and
improvements.

Key features:
- Random file/area selection for inspection
- Comprehensive code review guidelines (style, quality, bugs, architecture)
- Focus on genuine improvements, not pedantic changes
- Always creates PR to document inspection results
- Runs weekly on Mondays, can be triggered manually

The maintenance instructions cover:
- What to check: code style, null safety, test coverage, IdeaVim-specific issues
- When to make changes vs document issues
- Commit best practices (split complex changes into multiple commits)
- IdeaVim-specific considerations (enablement checks, Vim compatibility)
2025-10-09 13:04:55 +02:00
Alex Plate bdc29c3eb4 Add support for count(), index(), min(), max(), and range() vimscript functions
Implements five new vimscript list functions:
- count(): counts occurrences of a value in a list/dict
- index(): finds first index of a value in a list
- min()/max(): finds minimum/maximum value in a list/dict
- range(): generates a list of numbers with optional stride

Includes error handling for edge cases like zero stride and invalid ranges.
2025-10-03 20:59:29 +03:00
Alex Plate d46eb39635 Add support for repeat(), char2nr(), nr2char(), trim(), and reverse() vimscript functions
Implement five commonly used vimscript functions:

- repeat(expr, count): Repeats strings or lists multiple times
- char2nr(char): Converts character to Unicode code point
- nr2char(number): Converts code point to character
- trim(text, [mask], [dir]): Trims whitespace or custom characters
- reverse(object): Reverses lists in-place or returns reversed string

All functions include comprehensive test coverage and follow vim's
official behavior including edge cases.
2025-10-03 19:08:57 +03:00
Alex Plate a6c71d90bb Fix(VIM-4050): Implement getline vim function 2025-10-03 18:41:34 +03:00
Alex Plate 62de460264 Execute the processor with a proper mode after closing the exEntryPanel
Now, the inputProcessor will be called after all closing is finished. This includes the mode that won't be CMD_LINE anymore, but the one that was used before entering CMD_LINE
2025-10-03 15:33:27 +03:00
Alex Plate 2d02327665 Rename method to get the panel
Kotlin has some hard incremental compilation issues when keeping the old name. No other reason for the rename
2025-10-03 15:32:53 +03:00
Alex Plate 91b5a705d4 Fix issues with null variables during swing initialization 2025-10-03 15:16:04 +03:00
Alex Plate b7c3bc2875 Migrate ExOutputPanel from Java to Kotlin and update related references 2025-10-03 13:30:20 +03:00
Alex Plate 70922f5fc5 Rename .java to .kt 2025-10-03 13:30:19 +03:00
Alex Plate 13e4d0ce2b Migrate ExTextField from Java to Kotlin and update related references 2025-10-03 13:30:19 +03:00
Alex Plate 3990b6475e Rename .java to .kt 2025-10-03 13:30:19 +03:00
Alex Plate 63c65c8b93 Migrate ExEntryPanel from Java to Kotlin and update related references 2025-10-03 13:30:19 +03:00
Alex Plate ba2ffa6955 Rename .java to .kt 2025-10-03 13:30:19 +03:00
Alex Plate 411b6eaf48 Refactor ExDocument: Migrate from Java to Kotlin 2025-10-03 13:30:18 +03:00
Alex Plate b5ecb05382 Rename .java to .kt 2025-10-03 13:30:18 +03:00
IdeaVim Bot a5e4b8515d Add magidc, magidc to contributors list 2025-10-03 09:01:54 +00:00
Alex Plate 330f24bf74 Update JUnit to version 6 and improve null safety in test utilities 2025-10-02 18:04:30 +03:00
Alex Plate 36dfce695a Fix the compatibility with the latest idea EAP 2025-10-02 17:55:55 +03:00
Matt EllisandAlex Plãte 6defddd24c Extract variable expression assignment 2025-10-02 17:26:38 +03:00
Matt EllisandAlex Plãte a916b4de9c Rename Variable to VariableExpression 2025-10-02 17:26:38 +03:00
Matt EllisandAlex Plãte 8a0bdfd18f Improve sublist expression compatibility 2025-10-02 17:26:38 +03:00
Matt EllisandAlex Plãte 3eb0ac9207 Remove tests for indexed expressions 2025-10-02 17:26:38 +03:00
Matt EllisandAlex Plãte d71b99b8d5 Update SublistExpressionTest.kt 2025-10-02 17:26:38 +03:00
Matt EllisandAlex Plãte db8736dcf4 Extract sublist expression assignment 2025-10-02 17:26:38 +03:00
Matt EllisandAlex Plãte 4c3cefc1e6 Add typename for reporting purposes 2025-10-02 17:26:38 +03:00
Matt EllisandAlex Plãte b11fc4895b Support assigning to negative index 2025-10-02 17:26:38 +03:00
Matt EllisandAlex Plãte b7ce946af3 Extract sublist expression assignment
Also allows whitespace inside indexed expression
2025-10-02 17:26:38 +03:00
Matt EllisandAlex Plãte 5a45f6d945 Improve evaluating indexed expressions
Support negative indexes, float indexes, and indexing numbers
2025-10-02 17:26:38 +03:00
Matt EllisandAlex Plãte 6622f15ea3 Allow dictionary to be indexed by Float 2025-10-02 17:26:38 +03:00