Commit Graph
1497 Commits
Author SHA1 Message Date
filipp b4eef17aaa Add StringUtil.kt class
Methods in this file will be helpful in future search refactorings
2024-03-03 22:03:58 +02:00
filipp 5c50e8607c Fix search 2024-03-01 08:50:18 +02:00
Filipp Vakhitov 9a324ab448 Reset KeyHandlerState when switching Editors
Now we have a single state for all the editors, so we should not mix their states
2024-02-29 20:27:46 +02:00
dependabot[bot]andgithub-actions[bot] c3978335f5 Bump org.mockito.kotlin:mockito-kotlin from 5.0.0 to 5.2.1
Bumps [org.mockito.kotlin:mockito-kotlin](https://github.com/mockito/mockito-kotlin) from 5.0.0 to 5.2.1.
- [Release notes](https://github.com/mockito/mockito-kotlin/releases)
- [Commits](https://github.com/mockito/mockito-kotlin/compare/5.0.0...5.2.1)

---
updated-dependencies:
- dependency-name: org.mockito.kotlin:mockito-kotlin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-28 16:01:23 +00:00
filipp 3c94091d30 Merge branch 'refs/heads/master' into fleet 2024-02-23 17:24:08 +02:00
Parker7123andAlex Pláte db722fc4e5 VIM-1472 Add support for sorting with pattern 2024-02-23 17:15:21 +02:00
filipp 7d679e68dc Merge branch 'refs/heads/master' into fleet
# Conflicts:
#	vim-engine/src/main/kotlin/com/maddyhome/idea/vim/api/VimEditorGroup.kt
#	vim-engine/src/main/kotlin/com/maddyhome/idea/vim/impl/state/VimStateMachineImpl.kt
2024-02-23 17:08:01 +02:00
Matt EllisandAlex Pláte bc808403fb Rename localEditors to getEditors
The fact that these methods only return local editors (i.e., editors for the local user while hosting a Code With Me session) is an implementation detail
2024-02-23 17:01:32 +02:00
Matt EllisandAlex Pláte 9d6dc317a4 Only notify editors for the current buffer 2024-02-23 17:01:32 +02:00
Matt EllisandAlex Pláte cf29c50f31 Ensure editors are initialised before use
Fixes VIM-3256
2024-02-23 17:01:32 +02:00
Matt EllisandAlex Pláte 2ce3fbd677 Use common APIs to get local editors 2024-02-23 15:54:20 +02:00
Alex Plate 247aaed188 Use the property to change the state of the octopus handler 2024-02-23 15:32:35 +02:00
Filipp Vakhitovandfilipp 1a4333fa1b Move implementations to upper level
It will simplify support of immutable editors in Fleet
2024-02-23 15:09:45 +02:00
Filipp Vakhitovandfilipp 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 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 Vakhitovandfilipp 38bc914504 Avoid using annotation-processors in vim-engine 2024-02-23 15:09:45 +02:00
Filipp Vakhitovandfilipp c8113eea83 Commit state after receiving unknown key 2024-02-23 15:09:45 +02:00
Filipp Vakhitovandfilipp 924b7418e8 Fix DigraphSequence cloning 2024-02-23 15:09:45 +02:00
Filipp Vakhitovandfilipp a7dfef61e9 Make LazyVimCommand open 2024-02-23 15:09:45 +02:00
Filipp Vakhitovandfilipp db35c979b4 Move some editor methods to the base class 2024-02-23 15:09:45 +02:00
Filipp Vakhitovandfilipp 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 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 Vakhitovandfilipp 00f5541dc6 Add KeyProcessResult interface 2024-02-23 15:09:45 +02:00
Filipp Vakhitovandfilipp 02540eb303 Pass KeyHandlerState as a method argument 2024-02-23 15:09:45 +02:00
Filipp Vakhitovandfilipp 282e581bdb Make state cloneable 2024-02-23 15:09:45 +02:00
Filipp Vakhitovandfilipp 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