Antonio Scandurra
b6ff07afac
Add failing test for multi-byte characters
2022-05-03 14:33:57 +02:00
Antonio Scandurra
070607c821
Implement Editor::transpose
without accounting for multi-byte chars
2022-05-03 14:33:43 +02:00
Antonio Scandurra
2977b33dd9
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
5821ce9b82
Insert newlines on paste if copied selections don't match current ones
2022-05-02 10:21:20 +02:00
Keith Simmons
d4bef67cf2
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
2eb1c107ce
Convert common edit strings to Arc<str> and simplify duplicate line
2022-04-29 14:57:20 -07:00
Max Brunsfeld
2c2ca1bfbd
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
b4b61b4bbc
Consolidate edit and edit_batched functions
2022-04-28 16:52:04 -07:00
Max Brunsfeld
fa358c01cf
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
74b467aaa8
tweak editor selection mutating functions
2022-04-28 13:46:06 -07:00
Keith Simmons
42b900774e
add anchor to selection fixup info in newline
2022-04-28 13:10:31 -07:00
Max Brunsfeld
37a3cead03
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
0bb889afec
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
04fc1d5982
Building, but failing test WIP
2022-04-27 17:25:38 -07:00
Max Brunsfeld
a3700e0dd8
Combine diagnostic status w/ diagnostic message indicators
...
Improve the indicator styling
2022-04-27 14:25:39 -07:00
Max Brunsfeld
3ad13bdd4f
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
c9478cab09
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
cde5a45318
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
c61ae6f31f
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
92f040df00
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
53bf7b61c0
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
5e16adc6c9
Use document highlights to prepare rename if LSP doesn't support it
2022-04-22 15:43:57 +02:00
Nathan Sobo
8ec2b5e359
Delete selected text when deleting to beginning of line
2022-04-22 06:04:14 -06:00
Keith Simmons
5ea782de21
Add inclusive vs exclusive motions to vim mode
2022-04-21 16:50:23 -07:00
Antonio Scandurra
5081eafa9d
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
2695b13947
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
3cdda79fc3
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
6d33697e82
Fix warning
2022-04-14 13:03:46 +02:00
Antonio Scandurra
1a1d670104
Speed up WrapSnapshot::line_len
using the indexed transforms
2022-04-14 13:01:29 +02:00
Antonio Scandurra
91d4c835ad
Introduce TabMap::line_len
2022-04-14 12:55:33 +02:00
Keith Simmons
292d075f81
Store accessors for editor highlight colors not colors themselves
2022-04-13 15:30:57 -07:00
Keith Simmons
b893cb6d82
rename NavigationData anchor and offset to cursor_anchor and cursor_offset
2022-04-13 14:53:47 -07:00
Keith Simmons
9cec6d8d65
add comment explaining offsets
2022-04-13 13:30:07 -07:00
Keith Simmons
f20e3f35a1
Record scroll position in nav history
2022-04-13 12:30:33 -07:00
Max Brunsfeld
949fbe7cd3
Allow dumping the project diagnostic view's state as JSON
...
Also, improve DebugElements action so that it shows the JSON in an editor.
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-04-11 19:51:46 -07:00
Max Brunsfeld
b3c64e47f1
Merge branch 'main' into cancel-buffer-search
2022-04-11 17:38:26 -07:00
Max Brunsfeld
92a5c30389
Merge branch 'main' into load-keymaps
2022-04-11 15:55:10 -07:00
Keith Simmons
4b295f566a
Handle editor cancel in pane in order to dismiss find toolbar
2022-04-11 15:11:23 -07:00
Max Brunsfeld
3636c9ec25
Load workspace and editor key bindings from a JSON file
2022-04-10 11:18:08 -07:00
Nathan Sobo
17195e615e
Merge pull request #781 from zed-industries/structured-logging
...
Introduce structured logging
2022-04-09 07:40:24 -06:00
Max Brunsfeld
fd4b81c8fc
Allow actions to be deserialized from JSON
...
Introduce separate macro for implementing 'internal' actions which
are not intended to be loaded from keymaps.
2022-04-08 15:47:51 -07:00
Nathan Sobo
7e5a3f9f6b
Introduce structured logging
...
We're enabling the log crate feature everywhere, but only using it on the server for now.
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-04-08 10:06:51 -06:00
Max Brunsfeld
c801a52492
Convert some actions to use named fields
...
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-07 16:44:37 -07:00
Max Brunsfeld
5242a3a6dc
Restructure action macro to assign a namespace to every action
...
Also, allow arbitrary types to be used as Actions via the impl_actions macro
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-07 16:20:49 -07:00
Antonio Scandurra
73f2fd6b09
Pass visible bounds to Element::dispatch_event
2022-04-07 15:10:09 +02:00
Antonio Scandurra
52251c3463
Merge pull request #745 from zed-industries/scroll-tabs
...
Allow pane tabs to be scrolled when they overflow
2022-04-07 09:48:54 +02:00
Max Brunsfeld
ec837fa6d7
Update breadcrumbs when multibuffers' excerpts change
2022-04-06 17:12:36 -07:00
Max Brunsfeld
ea63df0519
Don't activate the next pane when opening excerpts
2022-04-06 15:46:11 -07:00
Keith Simmons
67b15ee037
Use language specific tabsize in editor commands
...
Co-authored-by: Max Brunsfeld <max@zed.dev>
2022-04-06 15:10:29 -07:00
Keith Simmons
1812480cbb
Tab size is pulled properly from settings instead of hardcoded
2022-04-06 10:23:37 -07:00