100 Commits
Author SHA1 Message Date
Matt EllisandAlex Pláte d7c4e4a8dd Add support for "-Command" flag for powershell
Fixes VIM-2622
2022-05-25 11:30:36 +03:00
Matt EllisandAlex Pláte b7c54d02cb Fix minor scroll bug
If caret is less than 'sidescrolloff' columns from the left of the screen, moving down one line will animate. Greater than 'sidescrolloff' does not animate. This is because the scroll model tries to scroll to a negative horizontal offset, to try and put the caret in the middle of the screen. This isn't possible, but the scroll model sees a large enough distance to trigger an animation.
2022-05-25 11:30:36 +03:00
Matt EllisandAlex Pláte 9a06ee97c4 Refactor CaretVisualAttributesHelper 2022-04-21 10:36:15 +03:00
Matt EllisandAlex Pláte d7dfc6dc05 Remove pre-212 caret attribute helpers 2022-04-21 10:36:15 +03:00
Matt Ellis cd242511a8 Fallback to line comment if block is unavailable
Fixes VIM-2381
2022-04-20 12:37:11 +01:00
Matt Ellis 745ae6caa4 Migrate Commentary tests to VimTestCase 2022-04-20 12:23:17 +01:00
Matt Ellis acc7d0954d Maintain old mappings for compatibility 2022-04-20 00:16:22 +01:00
Matt Ellis 7d5176829b Merge branch 'master' into feature/commentary 2022-04-18 17:12:02 +01:00
Matt Ellis fd0dc0d445 Remove unnecessary setting of sub mode 2022-04-15 13:36:44 +01:00
Matt Ellis be11317667 Use comment actions instead of low level handlers 2022-04-13 10:53:25 +01:00
Matt Ellis 22fce51640 Fix Exchange tests after operator changes
OperatorAction no longer normalises linewise ranges, but Exchange doesn't need this
2022-04-12 23:47:46 +01:00
Matt Ellis 4223da47d6 Refactor and simplify Commentary objects
Also introduces Visual support for the `g@` operator action
2022-04-12 22:05:48 +01:00
Matt Ellis 64100fea59 Add Commentary command 2022-04-12 16:53:21 +01:00
Matt Ellis 2244c65233 Reposition caret after commenting 2022-04-12 16:26:28 +01:00
Matt Ellis e08bffd7ba Add gcu mapping 2022-04-12 15:33:24 +01:00
Matt Ellis 0d5aa52af2 Add gc text object
Fixes VIM-2589
2022-04-12 15:33:23 +01:00
Matt Ellis cc029fc98e Implement gcc as gc_ motion
gcc now respects count

Fixes VIM-1687
2022-04-08 16:50:10 +01:00
Matt Ellis feae15c48c Use same mapping as Commentary plugin 2022-04-08 16:47:54 +01:00
Matt Ellis 07485727c4 Use Kotlin helper functions 2022-04-08 16:46:08 +01:00
Matt Ellis 8b0ad7680b Rearrange code 2022-04-08 16:44:04 +01:00
Matt Ellis 43d70cd467 Convert to Kotlin 2022-04-08 16:35:03 +01:00
Matt Ellis d73b605ef0 Rename Java to Kotlin 2022-04-08 16:32:59 +01:00
Matt EllisandAlex Pláte aed2d1159d fix(VIM-2470): Fix incorrect reset of cursor shape 2022-02-08 14:13:49 +03:00
Matt EllisandAlex Pláte 296b714282 fix(VIM-2462): reset caret when disabling plugin 2021-11-09 19:35:19 +03:00
Matt EllisandAlex Pláte 8344207608 fix(VIM-2432): handle scrolloff with <C-D> and <C-U> 2021-11-08 11:03:58 +03:00
Matt Ellis ae21727c12 Merge branch 'master' into feature/guicursor 2021-09-27 15:21:41 +01:00
Matt Ellis 6ab53802df Add tests for caret attributes in nested modes
See VIM-1756
2021-08-10 17:29:00 +01:00
Matt Ellis 70a45f3dc8 Treat use block caret option as caret override 2021-07-29 21:20:28 +01:00
Matt Ellis d63e3dadbc Merge branch 'master' into feature/guicursor 2021-07-28 23:07:47 +01:00
Matt Ellis 91585e1059 Run linters 2021-06-30 21:41:59 +01:00
Matt Ellis d6a99d4354 Update to latest EAP 2021-06-30 21:10:49 +01:00
Matt Ellis 0d840b2c41 Merge branch 'master' into feature/guicursor 2021-06-30 18:39:03 +01:00
Matt Ellis 0288a0f2b5 Use insert caret for select mode 2021-06-30 17:26:44 +01:00
Matt Ellis fe7dc4902b Make ExShortcutKeyAction dumb aware 2021-06-30 17:17:55 +01:00
Matt Ellis 1caf380505 Improve caret painting in command line 2021-06-30 17:15:52 +01:00
Matt Ellis 64be75142e Use guicursor options to draw ex caret 2021-06-29 17:05:11 +01:00
Matt Ellis f05123123c Use guicursor instead of editor cursor settings
This changes VIM-1475 and ignores IntelliJ's "use block cursor" setting in favour of guicursor. Also affects caret placement around inlays and handling of template hotspots via idearefactormode
2021-06-29 00:21:19 +01:00
Matt Ellis 2f73dac57a Force the caret visible when updating attributes
Changing EditorSettings.setBlockCursor does this via EditorImpl.updateCaretCursor
2021-06-28 23:48:27 +01:00
Matt Ellis a6087dd08f Use replace mode caret for change character action 2021-06-28 23:42:36 +01:00
Matt Ellis b4d40fae3b Rename assert method 2021-06-28 23:24:59 +01:00
Matt Ellis ad19dc0100 Use guicursor options to draw caret 2021-06-28 23:09:21 +01:00
Matt Ellis d19c776ec3 Minor refactor 2021-06-28 23:08:29 +01:00
Matt Ellis ccd792bf62 Provide hook for resetting cached values 2021-06-28 23:08:22 +01:00
Matt Ellis 8a55199d62 Add guicursor to dictionary 2021-06-28 23:08:14 +01:00
Matt Ellis 9cf0a1ac26 Report errors while parsing guicursor option 2021-06-28 23:06:49 +01:00
Matt Ellis 43620c280d Add guicursor option 2021-06-28 23:04:58 +01:00
Matt EllisandAlex Pláte 982d6921cb Fix formatting 2021-06-24 10:13:36 +03:00
Matt EllisandAlex Pláte bb28b76a5b Support % as shortcut for file name in filter 2021-06-24 10:13:36 +03:00
Matt EllisandAlex Pláte 67fed0da9e [VIM-1566] Use OS shell to execute filter command 2021-06-24 10:13:36 +03:00
Matt EllisandAlex Pláte e3cf50b4c9 [VIM-1357] Invoke shell filter commands with proper path and argument handling
Also moves the filter command out of a write action, and under a cancellable modal progress dialog. Any errors are substituted into the text, as per Vim.

Fixes #VIM-1357
2021-06-24 10:13:36 +03:00
Matt Ellis 9f46e1960e Fix typo 2021-06-10 13:51:43 +01:00
Matt Ellis e93a619859 Make ListOption generic + create StringListOption 2021-06-10 13:51:23 +01:00
Matt Ellis 287ba7055e Simplify BoundedListOption 2021-06-10 11:29:20 +01:00
Matt Ellis dfbec1f23a Rename "bound" options to "bounded" 2021-06-10 11:18:57 +01:00
Matt Ellis 55dedb4c4d Remove resetShape method
We should avoid setting the shape explicitly, and let it update when the mode changes.

Note that shape can affect the visual position of the caret around inlays (e.g. 'a' at the end of a rename hotspot with a trailing inlay for options will remain in between the text and the inlay, while 'l' in command mode will move after the inlay. Both positions are at the same text offset). We should still avoid explicitly setting shape before moving the caret. We can't guarantee the order of changing mode and moving the caret, so we update the visual position at the current offset when changing mode. (We're also currently using mode as an assumption of shape)
2021-06-10 11:05:41 +01:00
Matt Ellis 9c71b444c6 Update caret visual attributes when mode changes
Removes updateCaretState and unnecessary usages
2021-06-05 01:04:01 +01:00
Matt Ellis e859b1c131 Remove resetCaret 2021-06-05 00:33:04 +01:00
Matt Ellis 6c4bd9cc10 Refactor caret shape functions 2021-06-05 00:21:58 +01:00
Matt Ellis b50281f8d5 Extract caret shape methods to helper 2021-06-05 00:14:10 +01:00
Matt Ellis 2be0f5cedb Reset caret visual position after mode changes
Fixes an issue where the caret was incorrectly positioned because it was moved before the mode was changed. This wasn't visible in 211 because a couple of bugs in the platform combined to put the caret in the right place.

See #280, IDEA-262153 and KTIJ-3768
2021-06-04 17:05:03 +01:00
Matt Ellis 646a89d52a Refactor showMode update 2021-06-04 16:45:07 +01:00
Matt Ellis 0bde71d4dd Merge branch 'master' into VIM-2308 2021-05-14 11:51:25 +01:00
Matt Ellis 7300d252f8 Rename go to tab actions 2021-05-13 01:18:31 +01:00
Matt Ellis 9b73cc16e6 Move tab actions out of motion package 2021-05-13 01:12:24 +01:00
Matt Ellis b7da57d6d1 [VIM-2308] Fix caret and scroll position after gt 2021-05-13 00:05:06 +01:00
Matt EllisandAlex Pláte 4dc9c1f433 Fix scrolling at end of file with folds
Caret must be within scrolloff lines of the bottom of the file

Fixes VIM-2291
2021-04-23 20:03:13 +03:00
Matt Ellis 76f28ef94a Update formatting 2021-03-23 14:25:59 +00:00
Matt Ellis 3b89d96553 Handle scrolling page with virtual space 2021-03-23 01:01:15 +00:00
Matt Ellis 0fba78f885 [VIM-2177] Do not scroll end of file to bottom of screen 2021-03-22 14:20:28 +00:00
Matt Ellis ee38944cf9 Fix caret position at end of file with scrolloff 2021-03-22 10:10:36 +00:00
Matt Ellis 36901194dc Scroll last line to bottom of screen with G 2021-03-18 21:26:42 +00:00
Matt Ellis 58071007bd Ignore sidescrolloff with caret at start of line 2021-03-18 21:20:48 +00:00
Matt Ellis 07bafdf416 Minor clean up 2021-03-17 12:17:51 +00:00
Matt Ellis f7bb5ec500 Scroll view with Enter in insert mode 2021-03-17 12:17:51 +00:00
Matt Ellis b92114fec6 Scroll view when inserting new line above 2021-03-17 12:17:51 +00:00
Matt Ellis fe9bb2a712 Scroll view when inserting new line below 2021-03-17 12:17:51 +00:00
Matt Ellis 81996f8051 Do not beep when removing highlights with Escape 2021-03-17 12:17:51 +00:00
Matt Ellis a0a976c345 Scroll view for <Del> and <BS> in insert mode 2021-03-17 12:17:51 +00:00
Matt Ellis 9315f36f16 Scroll view for <Tab> in insert mode
Note that this doesn't actually work, as we ignore <Tab> in insert mode, so that other actions, specifically the live template action, can handle it. Without this, Emmet doesn't work (VIM-674). The scrolling does work with <C-I>
2021-03-17 12:17:51 +00:00
Matt Ellis cdc03836d2 Scroll view when moving up/down in insert mode 2021-03-17 12:17:50 +00:00
Matt Ellis a14e95ad6c Scroll view when deleting text 2021-03-17 12:17:50 +00:00
Matt Ellis dd230f720f [VIM-2230] Caret and inlay with preceding text 2021-03-17 12:17:50 +00:00
Matt Ellis fa781de76f Simplify inserting register text 2021-03-17 12:17:50 +00:00
Matt Ellis 377e085aa0 Merge branch 'master' into refactor-searchgroup 2021-03-10 11:45:55 +00:00
Matt Ellis 3642b32ed6 Fix range handling 2021-03-10 10:30:33 +00:00
Matt EllisandAlex Plate 16b901ea9e Update formatting 2021-03-05 10:38:39 +03:00
Matt EllisandAlex Plate 26a3974477 Stop multiple-cursors affecting search state
Searching no longer uses the high level search APIs that affect state such as saved searches, history and highlighting. Also conforms better to vim-multiple-cursors behaviour:
* Searches are now case sensitive
* Regular expressions in search text are ignored
* "Select all" works with nowrapscan
* Next occurrence based on existing selection no longer uses word boundary flag
* "No more matches" message shown at more appropriate times
2021-03-05 10:38:39 +03:00
Matt EllisandAlex Plate 9a10d6fe6c Remove usage of deprecated API 2021-03-05 10:38:38 +03:00
Matt EllisandAlex Plate eb72def6d0 Remove unnecessary caret move 2021-03-05 10:38:38 +03:00
Matt EllisandAlex Plate 3fe2a2e3b0 Fix updating last search/sub patterns 2021-03-05 10:38:38 +03:00
Matt EllisandAlex Plate d22d0f67b5 Remove duplication in invalid command message 2021-03-05 10:38:38 +03:00
Matt EllisandAlex Plate e56e944309 Simplify writing state 2021-03-05 10:38:38 +03:00
Matt EllisandAlex Plate 2d853d8d28 Rename searchAndReplace processSubstituteCommand 2021-03-05 10:38:38 +03:00
Matt EllisandAlex Plate e5d086dace Introduce test method to set state 2021-03-05 10:38:38 +03:00
Matt EllisandAlex Plate eccdd725b7 Introduce processSearchRange 2021-03-05 10:38:37 +03:00
Matt EllisandAlex Plate 284e0b4bf5 Rename search to processSearchCommand
The method is doing more than just searching, such as parsing the search command and state management
2021-03-05 10:38:37 +03:00
Matt EllisandAlex Plate 47becb2721 Remove unused count for main search method
This method is the main implementation for '/' and '?' and does not support a count. It is currently being used incorrectly in places that should be using a simpler find helper.
2021-03-05 10:38:37 +03:00
Matt EllisandAlex Plate 0b64e26235 Replace search command flags with Direction enum 2021-03-05 10:38:37 +03:00
Matt EllisandAlex Plate d90db8157c Remove overload that assumes primary caret offset 2021-03-05 10:38:37 +03:00
Matt EllisandAlex Plate 11da530151 Remove overload that takes a caret 2021-03-05 10:38:37 +03:00