Keith Simmons
9bb347b513
Review fixes
2022-05-13 15:55:27 -07:00
Keith Simmons
07ccf7c74b
minor tweaks to selections collection api
2022-05-13 15:55:27 -07:00
Keith Simmons
c95f74648a
Rename selected_ranges and selected_display_ranges to remove redundant selected
2022-05-13 15:55:27 -07:00
Keith Simmons
2a984285a2
store buffer and display_map model handles on selections collection
2022-05-13 15:55:27 -07:00
Keith Simmons
851e04d46b
Passing tests and removed local argument. Also pulled autoscroll argument out to change_selections
2022-05-13 15:55:27 -07:00
Keith Simmons
9b46bb0ee6
Move selection helpers to SelectionCollection, add update_anchor_selections, add a number of invariant preserving mutation functions to the MutableSelectionCollection
2022-05-13 15:55:17 -07:00
Keith Simmons
5e768dbf57
Add test coverage for same cursor in multiple excerpts of the same buffer
2022-05-10 14:30:27 -07:00
Keith Simmons
1ba3b210c3
Fix multiple cursors inserting repeated text in multibuffers
2022-05-10 13:32:27 -07:00
Keith Simmons
81c44f9733
Merge pull request #968 from zed-industries/vim-visual-mode
...
Vim visual mode
2022-05-10 12:51:58 -07:00
Keith Simmons
cdbad9aee4
Initial visual mode
2022-05-10 11:12:28 -07:00
Antonio Scandurra
58367fccfb
WIP
2022-05-05 15:15:58 +02:00
Max Brunsfeld and Antonio Scandurra
c98d740d34
Improve the appearance of project panel filename editor
...
* Always layout single-line editors with a fixed height
* Preserve directory chevron when editing folder names
* Allow theming the filename editor
Co-authored-by: Antonio Scandurra <me@as-cii.com >
2022-05-04 10:28:44 -07:00
Max Brunsfeld
a95bc19817
Abstract more local project setup inside Project::test helper
2022-05-04 10:28:09 -07:00
Antonio Scandurra
1fba966284
Merge pull request #964 from zed-industries/transpose
...
Introduce `Editor::transpose` bound to `ctrl-t`
2022-05-04 10:04:55 +02:00
Antonio Scandurra
e28a1b05fb
Improve transpose when cursors are two chars away from each other
2022-05-04 09:59:34 +02:00
Antonio Scandurra
b0179e57c8
Account for multi-byte characters in Editor::transpose
2022-05-03 14:35:03 +02:00
Antonio Scandurra
9cdcdccd51
Add failing test for multi-byte characters
2022-05-03 14:33:57 +02:00
Antonio Scandurra
556763b301
Implement Editor::transpose without accounting for multi-byte chars
2022-05-03 14:33:43 +02:00
Keith Simmons
660e3e9ef2
Add insert line above and below
2022-05-02 11:49:10 -07:00
Keith Simmons
b011dbee8c
WIP just missing insert line above and below
2022-05-02 11:49:10 -07:00
Antonio Scandurra
d1d6e692fd
Use the new batched edit API when pasting
...
This fixes a bug that would cause zed to paste text at the wrong
location when inside a multi-buffer where the same buffer was excerpted
more than once.
2022-05-02 10:21:53 +02:00
Antonio Scandurra
e2b7ef1716
Insert newlines on paste if copied selections don't match current ones
2022-05-02 10:21:20 +02:00
Keith Simmons
94b6f4beb5
Merge pull request #929 from zed-industries/non-uniform-batched-edits
...
Allow batched edits where each range is associated with different insertion text
2022-04-29 16:14:38 -07:00
Keith Simmons
b2c1230fea
Convert common edit strings to Arc<str> and simplify duplicate line
2022-04-29 14:57:20 -07:00
4d5d50f32a
Reduce string allocations in Editor::insert
...
Co-authored-by: Nathan Sobo <nathan@zed.dev >
Co-authored-by: Keith Simmons <keith@zed.dev >
2022-04-29 10:07:21 -07:00
Keith Simmons
47d4f42467
Consolidate edit and edit_batched functions
2022-04-28 16:52:04 -07:00
Max Brunsfeld
538046d5dc
Add format_on_save setting
...
This lets you turn of formatting on save for specific languages.
2022-04-28 14:31:06 -07:00
Keith Simmons
c630ce81bb
tweak editor selection mutating functions
2022-04-28 13:46:06 -07:00
Keith Simmons
19bd7fdb51
add anchor to selection fixup info in newline
2022-04-28 13:10:31 -07:00
Max Brunsfeld
dd67838c36
Merge pull request #921 from zed-industries/new-status-bar-design
...
Style the status bar according to the latest design
2022-04-28 12:42:25 -07:00
Antonio Scandurra
55c7c0b1b6
Merge pull request #923 from zed-industries/navigate-panic
...
Clip `scroll_top_row` before navigating back to it
2022-04-28 10:22:09 +02:00
Keith Simmons
5051769dd3
Building, but failing test WIP
2022-04-27 17:25:38 -07:00
Max Brunsfeld
0a4914f4bd
Combine diagnostic status w/ diagnostic message indicators
...
Improve the indicator styling
2022-04-27 14:25:39 -07:00
Max Brunsfeld
782b89d974
Display buffers in order of their path in refactor multibuffers
...
Previously, they were non-deterministically ordered via a HashMap iterator.
This was causing integration tests to fail spuriously on PRs.
2022-04-27 14:01:37 -07:00
Antonio Scandurra and Nathan Sobo
d567822913
Don't panic when navigation data contains invalid anchors and/or points
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-04-27 16:51:48 +02:00
Antonio Scandurra and Nathan Sobo
e22b136a50
Clip scroll_top_row before navigating back to it
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-04-27 16:25:26 +02:00
Keith Simmons
0a3ab68c09
Merge pull request #877 from zed-industries/misc-normal-commands
...
Add inclusive vs exclusive motions to vim mode
2022-04-22 14:25:56 -07:00
Nathan Sobo and Antonio Scandurra
73c0d58830
Apply cursor styles during paint
...
This makes the editor's cursor an IBeam and properly deals with nested cursor styles.
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2022-04-22 10:54:18 -06:00
Antonio Scandurra
873e654e28
Merge pull request #887 from zed-industries/fix-typescript-rename
...
Use document highlights to prepare rename if LSP doesn't support it
2022-04-22 16:37:13 +02:00
Antonio Scandurra
e551cf0636
Use document highlights to prepare rename if LSP doesn't support it
2022-04-22 15:43:57 +02:00
Nathan Sobo
9a8cb43695
Delete selected text when deleting to beginning of line
2022-04-22 06:04:14 -06:00
Keith Simmons
8e7fcb3b05
Add inclusive vs exclusive motions to vim mode
2022-04-21 16:50:23 -07:00
Antonio Scandurra and Max Brunsfeld
6956f6199c
Always wrap lines that are wider than 512 em advances
...
We went with a more conservative upper bound so that the number of
characters (hopefully) never exceeds `MAX_LINE_LEN` (1024) when laying
out text.
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2022-04-21 19:29:37 +02:00
Antonio Scandurra
4beffbe00d
Always clear rename state when selections change
...
At some point during the implementation of rename, we added logic for
invalidating the rename state when the selection moved outside the original
rename range. After transitioning to displaying renames as a block decoration,
we don't need that anymore given that a new, temporary editor is used instead.
This commit removes that invalidation logic and always calls `Editor::take_rename`
when the editor selections change. Doing so also fixes a bug that was causing Zed
to hide the cursor when clicking on the editor to dismiss the rename.
2022-04-15 10:32:07 +02:00
Max Brunsfeld
d0089e79ef
Merge pull request #817 from zed-industries/dynamic-editor-highlights
...
Store accessors for editor highlight colors not colors themselves
2022-04-14 10:36:38 -07:00
Antonio Scandurra
4fb8fff645
Fix warning
2022-04-14 13:03:46 +02:00
Antonio Scandurra
33d3501d8c
Speed up WrapSnapshot::line_len using the indexed transforms
2022-04-14 13:01:29 +02:00
Antonio Scandurra
bd4271d466
Introduce TabMap::line_len
2022-04-14 12:55:33 +02:00
Keith Simmons
23737d988d
Store accessors for editor highlight colors not colors themselves
2022-04-13 15:30:57 -07:00
Keith Simmons
6d2be6e44d
rename NavigationData anchor and offset to cursor_anchor and cursor_offset
2022-04-13 14:53:47 -07:00