1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2024-09-19 16:42:47 +02:00
Commit Graph

7711 Commits

Author SHA1 Message Date
Filipp Vakhitov
8eaa6df318 Throw error instead of warning on state conflict
It may indicate some serious issues, and we would like to know if anything goes wrong
2024-02-23 15:09:45 +02:00
Filipp Vakhitov
7523db186f Empty status bar message after each test 2024-02-23 15:09:45 +02:00
filipp
4aac113522 Remove duplicate method 2024-02-23 15:09:45 +02:00
filipp
795abd77a7 Add documentation 2024-02-23 15:09:45 +02:00
Filipp Vakhitov
38bc914504 Avoid using annotation-processors in vim-engine 2024-02-23 15:09:45 +02:00
Filipp Vakhitov
c8113eea83 Commit state after receiving unknown key 2024-02-23 15:09:45 +02:00
Filipp Vakhitov
924b7418e8 Fix DigraphSequence cloning 2024-02-23 15:09:45 +02:00
Filipp Vakhitov
a7dfef61e9 Make LazyVimCommand open 2024-02-23 15:09:45 +02:00
Filipp Vakhitov
db35c979b4 Move some editor methods to the base class 2024-02-23 15:09:45 +02:00
Filipp Vakhitov
2de933c723 Make processKey public 2024-02-23 15:09:45 +02:00
filipp
d3704d602f Cleanup after moving logic to other classes 2024-02-23 15:09:45 +02:00
filipp
ea62f227bf Remove piece of code for handling bad commands
Bad commands are handled in consumers
2024-02-23 15:09:45 +02:00
filipp
23fdadc32e Fix test
Sometimes it's not a plugin error and may indicate that key is propagated for later handling by IDE
But what we know for sure - that for both cases we should reset command builder
2024-02-23 15:09:45 +02:00
filipp
e9bf06686f Add synchronize blocks to minimize risk of concurrent key processing and changing of the KeyHandlerState 2024-02-23 15:09:45 +02:00
filipp
7842b155c1 Move some logic to ModeInputConsumer 2024-02-23 15:09:45 +02:00
filipp
74a8277e10 Move some logic to SelectRegisterConsumer 2024-02-23 15:09:45 +02:00
filipp
ddb1b80463 Move some logic to CommandConsumer 2024-02-23 15:09:45 +02:00
filipp
eea3336934 Move some logic to CommandConsumer 2024-02-23 15:09:45 +02:00
filipp
f801145712 Update MappingInfo to match newer signature 2024-02-23 15:09:45 +02:00
filipp
e033b08535 Move some logic to DigraphConsumer 2024-02-23 15:09:45 +02:00
filipp
1d9514a205 Move some logic to RegisterConsumer 2024-02-23 15:09:45 +02:00
filipp
6741120f19 Move some logic to CharArgumentConsumer 2024-02-23 15:09:45 +02:00
filipp
c501457322 Move some logic to EditorResetConsumer 2024-02-23 15:09:45 +02:00
filipp
46425a24c3 Move some logic to DeleteCommandConsumer 2024-02-23 15:09:45 +02:00
filipp
9826f0a7f0 Move some logic to CommandCountConsumer 2024-02-23 15:09:45 +02:00
filipp
43175061e0 Fix broken digraphSequence
It shouldn't be retested on partial reset
2024-02-23 15:09:45 +02:00
filipp
0ab32cac34 Make MappingProcessor a KeyConsumer 2024-02-23 15:09:45 +02:00
filipp
e3ec9c614b Add KeyConsumer
It will help us to have a more modular KeyHandler in future (chain of different consumers)
2024-02-23 15:09:45 +02:00
filipp
f454d60234 Add MutableBoolean to be able to pass and modify shouldRecord in methods 2024-02-23 15:09:45 +02:00
filipp
19fa00837c Use KeyProcessResultBuilder
It will help us to build the KeyProcessResult that we need for asynchronous key processing
2024-02-23 15:09:45 +02:00
filipp
275c5d28e1 Add KeyProcessResultBuilder 2024-02-23 15:09:45 +02:00
filipp
15ae069f6f Make keyHandlerState argument not null
Applying default values may lead to unexpected results, especially if we sometimes want to use the global state (IJ), and at other times, its clone for asynchronous processing (Fleet).
2024-02-23 15:09:45 +02:00
Filipp Vakhitov
00f5541dc6 Add KeyProcessResult interface 2024-02-23 15:09:45 +02:00
Filipp Vakhitov
02540eb303 Pass KeyHandlerState as a method argument 2024-02-23 15:09:45 +02:00
Filipp Vakhitov
282e581bdb Make state cloneable 2024-02-23 15:09:45 +02:00
Filipp Vakhitov
31e7c49608 Add equals & hashCode 2024-02-23 15:09:45 +02:00
filipp
7966a6dc91 Create KeyHandlerState
We do not need multiple commandBuilder, digraphSequence or mappingState and this class will be a singleton containing them
2024-02-23 15:09:45 +02:00
filipp
5fc2f04224 Remove mappingMode from MappingState
It unnecessarily binds mappingState to mode and thus to editor. And we want to simplify things and have a single MappingState instead of multiple of them
2024-02-23 15:09:45 +02:00
filipp
6edfd8ed22 Remove deprecated showmode status bar text update that does not work with the new UI and will be replaced with widget 2024-02-23 15:09:45 +02:00
filipp
363db05db7 Macro recording state is no longer per editor
It will not only simplify VimStateMachine, but also help us to support multi-editor macros in future
2024-02-23 15:09:45 +02:00
filipp
3738012dd6 Listeners refactoring
1. Listeners now disposed after turning plugin off
2. Change widget listeners to be recreated on plugin toggle
3. Add CaretVisualAttributesListener
2024-02-23 15:09:45 +02:00
filipp
355cfe035d Remove Editor from VimStateMachine
Rationale:
1. A much more experienced developer, whom I highly respect, suggested to empty VimStateMachineImpl constructor in his TODO comment.
2. I aim for VimStateMachine to be a data class rather than being a container for both data and complex logic.
3. From an architectural perspective, it is more correct. Editors do have state (or they may possess a single global state if the corresponding option is set), but a state does not own an editor.
2024-02-23 15:09:44 +02:00
Alex Plate
6d01b5be77
Stop maintaining the changelog file
We have quite a fucntionality to maintain the changelof in actual state
However, since we switched to release from the latest EAP, we can't just update the changelog on master because it will contains also unreleased changes since the latest EAP.
The proper support for such change will require a lot of coding that will take a lot of time to implement and will eventually break.
So, it was decided to keep the changelog on YouTrack only and not to maintain the changes file.

This change still may be reverted, so the code around the changelog is note removed, but only commented out
2024-02-23 14:05:12 +02:00
Alex Plate
4938957483
Add a comment line with LATEST-EAP-SNAPSHOT 2024-02-23 13:37:36 +02:00
Alex Plate
46f4fa7cdd
Make tests about join notification more stable
Now we track only new notifications instead of just taking the last one
2024-02-23 11:27:15 +02:00
Alex Plate
f696135f31
Now we execute beforeActionPerformedUpdate instead of lastUpdateAndCheckDumb right before action execution
This is done because of platform changes. Now the `lastUpdateAndCheckDumb` doesn't update an action that supposed to be updated on background.
The problem was detected with commentary tests. The test supposed to use the line comment in case the block comment is not available. However, the since the action was not updated, the presentation was not reset to false and the fallback to line action was not performed.
2024-02-23 11:26:45 +02:00
Alex Plate
52e0fcdc7d
Use the custom version of IntIterator.skip because it was removed from the library 2024-02-23 10:29:33 +02:00
Alex Plate
ac17518a23
Update the changelog 2024-02-23 10:19:39 +02:00
6dd924b2b2 Implement motions to go to next/previous misspelled word 2024-02-23 10:17:25 +02:00
Matt Ellis
f439474b73 Fix set command tests
Also hides more feature flags and diagnostic settings from users and unit tests. Shows them when in internal mode.
2024-02-23 10:04:23 +02:00