1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2024-11-25 16:42:55 +01:00
Commit Graph

544 Commits

Author SHA1 Message Date
Alex Plate
4731eb9db8
Bring back removed functions 2023-09-14 16:50:52 +03:00
Alex Plate
337f5ade59
Get rid of deprecated method 2023-09-14 16:31:26 +03:00
Alex Plate
fe8bbcb11a
Bring back a method to keep the compatibility 2023-09-14 16:26:14 +03:00
Alex Plate
b1b6b0bf80
Add links to the new page about modes 2023-09-14 15:44:00 +03:00
Matt Ellis
585b815472 Only notify changes if the value is different
This is primarily to avoid instantiating inactive extensions when
resetting all options back to default values, which sets extensions
inactive.
It applies to global and local options, but not to global-local. The
notifications for global-local options are already complex, as they can
be reacting to changes to both the global and local value, and only
notifying editors that are affected.
2023-09-11 11:04:09 +03:00
Matt Ellis
c37e2f4176 Update fallback window when all windows close 2023-09-11 11:04:09 +03:00
Matt Ellis
32b8d03c5e Improve modifying string and string list options 2023-09-11 11:04:09 +03:00
Matt Ellis
71f3e1b4f1 Support per-window global values
For local-to-window options
2023-09-11 11:04:09 +03:00
Matt Ellis
aa6f53fa68 Require editor when getting/setting global option 2023-09-11 11:04:09 +03:00
Matt Ellis
700198d8bc Remove test only vimscript execute method 2023-09-11 11:04:09 +03:00
Matt Ellis
3efab5928e Evaluate ideavimrc in the fallback window context 2023-09-11 11:04:09 +03:00
Matt Ellis
93037b6866 Add fallback window to capture local option state 2023-09-11 11:04:09 +03:00
Matt Ellis
0f19e50c69 Improve hierarchy of option accessors
Getting the effective IJ options would allow access to Vim global and IJ global, but not Vim effective. IntelliJ specific options are now a separate hierarchy, so the Vim effective and IJ effective accessors now simply access all Vim or all IJ options.
2023-09-11 11:04:09 +03:00
Matt Ellis
66ea6ad3d4 Rename OptionScope to OptionAccessScope 2023-09-11 11:04:09 +03:00
filipp
0c1dc51db4 Fix(VIM-3060): Clipboard interaction stopped working
Fix for Windows
2023-09-07 14:42:00 +03:00
filipp
74a710c5e8 VIM-3060 Clipboard interaction stopped working
Fixed issue and tests (for Linux)
2023-09-07 02:39:23 +03:00
Alex Plate
456055bcf0
Do not run multiple carets from ChangeEditorActionHandler and instead pass this information to EditorActionHandlerBase
This is needed for the new way we register handlers. As we can't be sure that this commands won't be called from the `runForEachCaret` context, we have to avoid this method
2023-09-01 17:25:14 +03:00
Alex Plate
4532d68743
Convert change group to kotlin 2023-09-01 14:29:51 +03:00
Alex Plate
26e9bf5197
Detect if we run the action in runForEachCaret scope or not 2023-09-01 13:25:15 +03:00
dependabot[bot]
38e1a62f19 Bump org.jetbrains.kotlinx:kotlinx-serialization-json-jvm
Bumps [org.jetbrains.kotlinx:kotlinx-serialization-json-jvm](https://github.com/Kotlin/kotlinx.serialization) from 1.5.1 to 1.6.0.
- [Release notes](https://github.com/Kotlin/kotlinx.serialization/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.serialization/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Kotlin/kotlinx.serialization/compare/v1.5.1...v1.6.0)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-serialization-json-jvm
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-30 18:36:38 +03:00
Alex Plate
e7a8b45c10
[VIM-3051] Refactor the way we store modes in IdeaVim
Now we have a single variable with current mode instead of stack of modes.
2023-08-25 11:38:21 +03:00
dependabot[bot]
336f1c3b80 Bump org.jetbrains.kotlinx:kotlinx-serialization-json-jvm
Bumps [org.jetbrains.kotlinx:kotlinx-serialization-json-jvm](https://github.com/Kotlin/kotlinx.serialization) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/Kotlin/kotlinx.serialization/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.serialization/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Kotlin/kotlinx.serialization/compare/v1.5.0...v1.5.1)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-serialization-json-jvm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-16 16:21:36 +00:00
Alex Plate
22ca74a1a3
Use a different approach for switching to visual mode. The previous way caused "recursive runForEachCaret exception" 2023-08-14 16:17:47 +03:00
Alex Plate
3093c9212c
Add note about visual type in text objects 2023-08-14 16:17:46 +03:00
dependabot[bot]
6b8a4e6e63 Bump org.junit.jupiter:junit-jupiter-engine from 5.9.2 to 5.10.0
Bumps [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5) from 5.9.2 to 5.10.0.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.9.2...r5.10.0)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-14 11:28:23 +03:00
dependabot[bot]
d256870953 Bump org.junit.jupiter:junit-jupiter-api from 5.9.2 to 5.10.0
Bumps [org.junit.jupiter:junit-jupiter-api](https://github.com/junit-team/junit5) from 5.9.2 to 5.10.0.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.9.2...r5.10.0)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-14 08:16:59 +00:00
Ludwig Valda Vasquez
068d610e3a Add grapheme cluster handling tests
GraphemeBreakTest.txt was downloaded from the Unicode Character Database [0].

Changes to build.gradle.kts were required to stop `gradlew test` from
regenerating the resources with empty JSON objects. And adding a
dependency.

[0]: https://www.unicode.org/Public/UCD/latest/ucd/auxiliary/GraphemeBreakTest.txt
2023-08-14 09:04:41 +03:00
Ludwig Valda Vasquez
41177b91be Handle unicode grapheme clusters
Some characters that render as a single symbol can span over a sequence
of several unicode code points (e.g., flag emojis, combination of a
letter and a diacritic, Hangul syllables, etc.).

Such composites are called grapheme clusters in the unicode standard,
and this patch introduces recognition of extended grapheme cluster
boundaries, allowing to iterate over rendered characters. Without this,
user may observe the cursor being "stuck" inside a character for several
keystrokes, while it's making its way through each code point in the
grapheme cluster.

The implementation follows the boundaries search algorithm outlined in
the technical report 29 of the Unicode standard[1]. The implementation was
tested against the set of test cases provided by the unicode character
database[2].

Additionally to the grapheme cluster boundaries search itself, this
patch adds `isExtendedPictographic` function, that answers whether the
given code point has a unicode "Extended_Pictographic" property, which
is required to correctly determine grapheme cluster boundaries. This
method is implemented natively in the JDK 21 and can be removed once we
start targeting that version.

Extended_Pictographic property is stored as a bitmap. I was considering
making a similar map for the code point classification in the grapheme
cluster boundary search implementation, which could yield better
performance, but that would require adding another half a megabyte (at
least) of data into the JAR and I've settled for the bunch of `if`s way.

That is something that can be reconsidered and shouldn't be difficult to
change if the impact on performance would be noticeable (in my simple
tests it didn't show).

A few functions in the vim-engine were adjusted to handle grapheme
clusters (such as getting the horizontal offset and adjusting the cursor
to not reach over the end of the line).

[1]: https://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries
[2]: https://www.unicode.org/Public/UCD/latest/ucd/auxiliary/GraphemeBreakTest.txt
2023-08-14 09:04:41 +03:00
Alex Plate
5d4996c085
Optimize imports on the project 2023-08-11 11:54:38 +03:00
filipp
1fe64e69ca Support running tests if headless 2023-08-04 19:00:47 +03:00
filipp
41df06a48b Fix failing tests second attempt
(please please)
2023-08-03 14:00:03 +03:00
filipp
4188e636f3 Fix failing tests
(please)
2023-08-03 13:39:33 +03:00
filipp
e2c0d59e3a Fix default register for unnamedplus without X 2023-08-03 11:24:29 +03:00
Alex Plate
a62cc3618c
Fix an issue with disposed caret when moving up
There was an issue that when we enter visual block, move up, then try to switch to the visual line, we get a disposed caret issue.
This was caused by the fact that we get the list of carets, then process them one by one. However, as we update the first caret, the second gets disposed.
2023-08-01 16:17:39 +03:00
Matt Ellis
d112030a8e Add explanatory comment about InsertExitModeAction 2023-08-01 12:22:26 +03:00
Matt Ellis
dd24ebf184 Rename OptionsScope.AUTO to EFFECTIVE 2023-07-31 11:28:32 +03:00
Matt Ellis
7ef2be625f Refactor parseOptionLine for readability 2023-07-31 11:28:32 +03:00
Matt Ellis
e3957d2207 Minor updates from code review 2023-07-31 11:28:32 +03:00
Matt Ellis
e1141dcd1c Remove old option listener API 2023-07-31 11:28:32 +03:00
Matt Ellis
54dc184dd0 Introduce option effective value change listener 2023-07-31 11:28:32 +03:00
Matt Ellis
1977ce3ea5 Add simple one to many collection 2023-07-31 11:28:32 +03:00
Matt Ellis
c8c9d1729e Introduce listener for global option changes 2023-07-31 11:28:32 +03:00
Matt Ellis
1c465f028e Fix option scopes for :let command 2023-07-31 11:28:32 +03:00
Matt Ellis
12824c22c4 Add :setglobal command 2023-07-31 11:28:32 +03:00
Matt Ellis
080c2059ee Format unset global-local toggle options 2023-07-31 11:28:32 +03:00
Matt Ellis
a288850010 Add support for resetting option to global value 2023-07-31 11:28:32 +03:00
Matt Ellis
16811602d2 Support global-local options 2023-07-31 11:28:32 +03:00
Matt Ellis
6d94d719e3 Only notify change if option has changed 2023-07-31 11:28:32 +03:00
Matt Ellis
749d111e89 Reset options for current editor only
Matches Vim behaviour for `:set all&`
2023-07-31 11:28:32 +03:00
Matt Ellis
365d8d34ce Introduce AUTO scope for effective option values 2023-07-31 11:28:32 +03:00