Commit Graph
8491 Commits
Author SHA1 Message Date
Filipp Vakhitov f6146b8732 Fix(VIM-3802): Completion should create undo checkpoint 2025-02-25 14:36:46 +02:00
Alex Plate 4025619b48 Turn write action while executing the IJ action into an error 2025-02-24 14:40:42 +02:00
Alex Plate 9b1da76499 Remove unneeded write action in output panel 2025-02-24 14:39:59 +02:00
Alex Plate 4ca25eed70 Remove the use of write action in macros 2025-02-24 14:31:14 +02:00
Alex Plate a925676d64 Fix issues with command line prompt processing 2025-02-24 13:59:31 +02:00
Alex Plate 6feb1a4525 Remove the change of ordering inside the clearPromptCharacter 2025-02-24 12:43:39 +02:00
Alex Plate 4cf7685aaf Fix incorrect condition in getting the actual text in command line 2025-02-24 12:21:34 +02:00
Alex Plate e257a10525 Fix an issue that the highlighting was silently missing due to an error 2025-02-24 12:13:51 +02:00
Alex Plate 2e8548cb25 Update gradle wrapper 2025-02-24 12:13:26 +02:00
Alex Plate 1d25927676 [TC] Upgrade the version of IJ for some build 2025-02-24 11:16:08 +02:00
Alex Plate 42d80f6866 Add write action in several places 2025-02-21 19:32:47 +02:00
Alex Plate c9189ed7cb Commands don't start the read and write actions automatically. See the explanation in the previous commit messages.
Related to the implementation of VIM-3376
2025-02-21 19:11:28 +02:00
Alex Plate fedefea0aa Remove the write action in several places 2025-02-21 18:56:52 +02:00
Alex Plate 437fa9a1a0 Remove the root write and read actions
Historically, IdeaVim was starting read or write action based on command type. However, this is incorrect because of several reasons:
- The command of different type may perform a write/read action
- The write lock with a lot of code inside does cause application freezes
- Since a large branching of code happens inside the write action, there is a chance of read action request, resulting in the deadlock

Also, now this prevents from implementing a proper execution of VIM-3376.
2025-02-21 18:44:51 +02:00
Alex Plate 0511ee277f Remove the requirement for the write action in macros
It's not clear why the write action was needed. Probably, it was a mistake and it supposed to be a check for EDT. However, since the check for EDT exists right in the constructor of the potemkin progress, let's remove it at all.
2025-02-21 17:40:40 +02:00
Alex Plate 0b2bda529f Upgrade the minimal supported version to 243 2025-02-21 16:59:28 +02:00
Alex Plate fe91744356 Mention 2024.3.3 in gradle script 2025-02-21 13:40:31 +02:00
Alex Plate 45d92c1981 Use the read action for neovim tests in other place 2025-02-21 13:33:53 +02:00
Alex Plate 58de834832 Use the read action for neovim tests 2025-02-21 13:17:37 +02:00
Alex Plate 8d89847d4b Add tests for 2024.3.3 2025-02-21 13:15:43 +02:00
Alex Plate bf78445ac6 Add links to intellij platform community space 2025-02-21 13:11:59 +02:00
Alex Plate 3866565e51 Remove IdeaVimTestCase and replace it with VimTestCase 2025-02-21 13:03:23 +02:00
Alex Plate 564ab7d75e Remove EDT and write action from the VimTestCase 2025-02-21 09:54:12 +02:00
Matt EllisandAlex Pláte 24c0d31f14 Updated comment and defaults for word end action
The `ge` motion incorrectly had `stopAtEmptyLine` set to false, but `ge` always stops at empty lines. This option is only applicable for forward motion, so is ignored by the implementation of `findPreviousWordEndOne`.
2025-02-21 09:53:11 +02:00
Matt EllisandAlex Pláte 43a2bd98db Reduce multiple implementations to one 2025-02-21 09:53:11 +02:00
Matt EllisandAlex Pláte c4f56c40fd Rename findWordUnderCursor to findWordObject
Starting to distinguish between the other findWordUnderCursor implementations!
2025-02-21 09:53:11 +02:00
Matt EllisandAlex Pláte 1b4b66dbb1 Minor refactoring 2025-02-21 09:53:11 +02:00
Matt EllisandAlex Pláte 4787a5e22a Rewrite backwards search for word under cursor 2025-02-21 09:53:11 +02:00
Matt EllisandAlex Pláte d2b85cbb10 Merge inner and outer motion implementations 2025-02-21 09:53:11 +02:00
Matt EllisandAlex Pláte 0428c2aeff Rewrite inner motion to match outer motion
The implementations are so similar and can now be refactored/simplified
2025-02-21 09:53:11 +02:00
Matt EllisandAlex Pláte 1a8789b50c Rewrite next/previous word motions and objects 2025-02-21 09:53:11 +02:00
Matt EllisandAlex Pláte b5937e885d Rewrite displayLocationInfo to avoid findNextWord
Simplifies and fixes counting words, especially when selection intersects words. Also moves implementation to engine and adds more tests.
2025-02-21 09:53:11 +02:00
Matt EllisandAlex Pláte 8eef802ac7 Add notes on possible refactoring 2025-02-21 09:53:11 +02:00
Matt EllisandAlex Pláte cad6afdc9d Rewrite word end motions and word objects 2025-02-21 09:53:11 +02:00
Matt EllisandAlex Pláte 54ef691a98 Add tests for outer word motions and blank lines 2025-02-21 09:53:11 +02:00
Matt EllisandAlex Pláte 426c2fd006 Handle blank and empty lines for text objects
Fixes VIM-1642
2025-02-21 09:53:11 +02:00
Matt EllisandAlex Pláte f25c56b545 Refactor checks for including following whitespace 2025-02-21 09:53:11 +02:00
Matt EllisandAlex Pláte 960eb50d8c Fix incorrectly selected new line char with viw 2025-02-21 09:53:11 +02:00
Matt EllisandAlex Pláte 18b4b76ebf Select trailing whitespace with viw
Inner word/WORD motions will select trailing whitespace at the end of a line without wrapping
2025-02-21 09:53:11 +02:00
Matt EllisandAlex Pláte d9e575d4a2 Select leading whitespace with viw
Inner word/WORD motions will select leading whitespace at the start of a line without wrapping
2025-02-21 09:53:11 +02:00
Matt EllisandAlex Pláte 1769804c8a Select leading whitespace with vaw
Outer word/WORD motions will select leading whitespace at the start of a line
2025-02-21 09:53:11 +02:00
Matt EllisandAlex Pláte 81e094ac8f Select trailing whitespace with vaw
Outer word/WORD motions will select trailing whitespace at the end of a line
2025-02-21 09:53:11 +02:00
Matt EllisandAlex Pláte 4240c429ba Select preceding whitespace if no following (vaw)
Outer word/WORD text objects should select following whitespace, unless there isn't any, and then it should select preceding whitespace.
2025-02-21 09:53:11 +02:00
Matt EllisandAlex Pláte 76f7d81129 Minor code cleanup. No logic changes 2025-02-21 09:53:11 +02:00
Matt EllisandAlex Pláte 2da77f0f11 Add tests for existing word/WORD text objects 2025-02-21 09:53:11 +02:00
Matt EllisandAlex Pláte 580764b30c Match empty line as word/WORD
Unless moving to end of word/WORD, in which case, skip all whitespace to get to end of the next set of word/WORD characters.

Fixes VIM-1650
2025-02-21 09:53:11 +02:00
Matt EllisandAlex Pláte afd69eef95 Fix end of file edge case deleting previous word
Adds extra tests to confirm that deleting previous word in Insert mode was already working as expected (relates to VIM-1650)

Also fixes an edge case for a test that was marked as behaving differently to Vim, but was actually showing buggy behaviour due to its unorthodox caret placement. It looked like the caret was placed at the end of the line, but it was actually placed _passed_ the last character in the file. Adding extra text below the caret placement would cause the action to behave as expected, and the test would then match Vim behaviour. However, it is possible to get this caret position in the editor and in Vim, with `virtualedit=onemore`, and the IdeaVim implementation was wrong. The test has been updated to provide the correct scenario, and the implementation has been fixed.
2025-02-21 09:53:11 +02:00
Matt EllisandAlex Pláte be1cc67566 Fix previous word end motion at start of file 2025-02-21 09:53:11 +02:00
Matt EllisandAlex Pláte b534708a99 Rename file to show it contains several actions 2025-02-21 09:53:11 +02:00
Matt EllisandAlex Pláte 4bc75e0a9b Add tests for existing word/WORD motion behaviour 2025-02-21 09:53:11 +02:00