Commit Graph
5321 Commits
Author SHA1 Message Date
Antonio Scandurra 45eb0e7889 Clip invalid edits from LSP instead of reporting an error
This fixes an issue with the Go language server, which reports invalid
formatting ranges when there's a missing newline at the end of the file.
Specifically, if the buffer is `N` lines long, it will try to insert the
newline at `Point(N + 1, 0)`.

I confirmed the behavior is the same in VS Code, and they indeed clip the
LSP ranges as well.
2022-07-26 08:43:27 +02:00
Max Brunsfeld 9cefeb08e1 Merge pull request #1411 from zed-industries/no-gpu-log
Log instead of showing an alert when exiting due to no GPU
2022-07-25 16:21:05 -07:00
Mikayla Maki 2f7ad0a01a Merge pull request #1410 from zed-industries/ctrl-c-regression
Fixed keybinding regression
2022-07-25 16:20:52 -07:00
Max Brunsfeld ea82b9353d Log instead of showing an alert when exiting due to no GPU
Showing the alert resulted in a panic because tasks
dispatched to the app's main GCD queue continue
to run even while the alert is displayed.
2022-07-25 16:13:28 -07:00
Mikayla Maki 313316fe88 fixed 2022-07-25 16:08:31 -07:00
Julia 888405a4b2 Merge pull request #1409 from zed-industries/middle-mouse-close-tabs
Allow closing tabs with the middle mouse button
2022-07-25 17:05:00 -04:00
Max Brunsfeld d9de0261ba Merge pull request #1405 from zed-industries/ime-support-2
Improve support for non-US keyboards and input
2022-07-25 12:57:57 -07:00
Max Brunsfeld 13097ea110 Update terminal test to reflect new text insertion approach 2022-07-25 12:21:26 -07:00
Max Brunsfeld ab037fe844 Simulate calling of text-insertion APIs in TestAppContext::dispatch_keystroke 2022-07-25 12:20:12 -07:00
Max Brunsfeld a54d9f1697 Add comment about noop performKeyEquivalent function 2022-07-25 11:42:54 -07:00
Max Brunsfeld 09c0211c96 Bump the RPC protocol version 2022-07-25 11:36:52 -07:00
Max Brunsfeld 4c8d9384b1 Replaces lines_utf16 with a single u32 - last_line_len_utf16 2022-07-25 11:35:42 -07:00
ForLoveOfCats 36d789ff84 Allow closing tabs with the middle mouse button 2022-07-25 14:23:38 -04:00
Antonio Scandurra 6dc27cbba2 Add test for IME composition with multiple cursors 2022-07-25 17:47:10 +02:00
Antonio Scandurra ff99f8d0ca Clip UTF-16 offsets provided by Cocoa when composing IME input 2022-07-25 17:32:33 +02:00
Antonio Scandurra 47e8bd5f4f Introduce MultiBuffer::clip_offset_utf16 2022-07-25 15:06:04 +02:00
Antonio Scandurra c46be992e0 Introduce Rope::clip_offset_utf16 2022-07-25 15:02:45 +02:00
Antonio Scandurra bb55d654ce Handle IME composition with multiple cursors 2022-07-25 14:50:09 +02:00
Antonio Scandurra acdfb933e8 Honor shift if pressing command switches keyboard 2022-07-25 11:01:38 +02:00
Antonio Scandurra ca3e73106c Merge branch 'main' into ime-support-2 2022-07-25 10:47:49 +02:00
Antonio Scandurra d3567e381c Coalesce IME compositions into a single edit 2022-07-25 09:53:51 +02:00
Antonio Scandurra 555e705ccb 🎨 2022-07-23 09:31:41 +02:00
Antonio Scandurra 0fc7308932 Allow grouping local transactions even if remote peer edits in between 2022-07-23 09:27:21 +02:00
Max Brunsfeld 79f960b69e Combine adjacent ranges in 'edited_ranges_for_transaction' 2022-07-22 17:41:31 -07:00
Max BrunsfeldandAntonio Scandurra 7c3421e041 Remove versioned offset ranges from transactions and undo operations
Now, instead of using these versioned offset ranges, we locate the
fragments associated with a transaction using the transaction's
edit ids. To make this possible, buffers now store a new map called
`insertion_slices`, which lets you look up the ranges of insertions
that were affected by a given edit.

Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2022-07-22 17:28:55 -07:00
Mikayla Maki 8c1d4d877f Merge pull request #1393 from zed-industries/graceful-exit
Polishing the terminal
2022-07-22 13:59:13 -07:00
Mikayla Maki a41e54f3dc Finished terminal refactoring 2022-07-22 13:54:46 -07:00
Mikayla Maki 119207a9e5 Refactored a bunch of stuff, working on tidying element code 2022-07-22 12:06:42 -07:00
Max BrunsfeldandAntonio Scandurra 65fd943509 Move edited_ranges_for_transaction from BufferSnapshot to Buffer
Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2022-07-22 11:24:14 -07:00
Keith Simmons 2111fdc118 Merge pull request #1378 from zed-industries/diagnostics-popover
Diagnostics Popover
2022-07-22 11:12:56 -07:00
K Simmons b93040a6ae attempt to fix broken test 2022-07-22 10:55:57 -07:00
Mikayla Maki dce27870ce Refactored terminal tests 2022-07-22 10:20:15 -07:00
Antonio Scandurra 7b009c8bbe Merge branch 'main' into ime-support-2 2022-07-22 16:03:38 +02:00
Antonio Scandurra 2bfa3b9006 Synthesize CGEvents instead of using charactersByApplyingModifiers 2022-07-22 15:51:34 +02:00
Antonio Scandurra 622596619c Honor ⌘ when Dvorak-QWERTY is used 2022-07-22 14:52:24 +02:00
Antonio Scandurra 136550de9f Discard shift when it causes keyboard to output a different character 2022-07-22 08:15:44 +02:00
Max Brunsfeld 9c412a8806 Remove test for handling input via key events
Now, textual input is handled by a different code path than other key events.
2022-07-21 21:40:37 -07:00
Max Brunsfeld 372c3eed52 Adjust editor tests to use input APIs instead of key events 2022-07-21 21:36:40 -07:00
Max Brunsfeld 0185b4fef4 Add simple IME handling to the terminal 2022-07-21 21:32:58 -07:00
Keith Simmons 9286e5ea04 Merge pull request #1396 from zed-industries/better-empty-pane
Fix Pane Focus Issues
2022-07-21 15:07:03 -07:00
K Simmons d6519ad280 Minor naming improvements and revert empty pane background color change 2022-07-21 14:56:17 -07:00
Max Brunsfeld 6d264502b2 Remove print statements 2022-07-21 13:44:58 -07:00
Max Brunsfeld 2142fca673 Remove Input action, detect ignored input in vim via an event 2022-07-21 13:40:48 -07:00
Max Brunsfeld beeaec8647 Prevent IME window from appearing while editor's input is disabled (vim) 2022-07-21 12:48:36 -07:00
Mikayla Maki c6d5decbf9 Finished erorr terminal refactoring 2022-07-21 12:37:15 -07:00
Max Brunsfeld 7c575990be Remove the set_selected_text_range method from the InputHandler trait 2022-07-21 12:22:12 -07:00
Mikayla Maki 7c0a031506 added cursor text back 2022-07-21 10:04:12 -07:00
Antonio Scandurra 509f54bf20 Don't dispatch keydown event if editor is still composing 2022-07-21 17:37:32 +02:00
Antonio Scandurra 97ce3998ec Position IME input according to where the selection is rendered 2022-07-21 17:35:40 +02:00
Antonio Scandurra 3c5d7e001e Always mark keydown events as handled to suppress beep 2022-07-21 15:53:21 +02:00