Commit Graph
4862 Commits
Author SHA1 Message Date
Max Brunsfeld db9354e8a8 Treat window deactivation as a focus change for the purpose of autosave 2022-07-06 11:20:29 -07:00
Max Brunsfeld d64433e78f Merge pull request #1291 from zed-industries/fix-autosave-on-close
Fix autosave when closing a tab
2022-07-06 10:54:44 -07:00
Max Brunsfeld 510530171f Merge pull request #1292 from zed-industries/paste-panic
Fix panic on paste when editing with auto-indent
2022-07-06 10:50:38 -07:00
Antonio ScandurraandMax Brunsfeld 6d573a2822 Normalize line endings when parsing completions
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-07-06 19:32:45 +02:00
Antonio Scandurra f94bfeb1cc Fix panic on paste when editing with auto-indent
Instead of accepting text as it's input by the user, we will read it
out of the edit operation after it gets sanitized by the buffer.
2022-07-06 19:00:11 +02:00
Antonio Scandurra 8ba44e5f47 Prevent autosave for deleted files 2022-07-06 17:25:33 +02:00
Antonio Scandurra 79f438ed97 Save item when closing it if autosave on focus change is enabled 2022-07-06 17:04:41 +02:00
Antonio Scandurra 6ff2f165a7 Move autosave tests down into Workspace 2022-07-06 16:55:05 +02:00
Antonio Scandurra f879f75a45 Move autosave logic up into Workspace and Pane 2022-07-06 16:33:22 +02:00
Antonio Scandurra dba2c284f6 Report whether a view was focused or blurred when observing focus 2022-07-06 15:53:40 +02:00
Antonio Scandurra a1c12562e9 v0.44.1 2022-07-06 12:42:41 +02:00
Antonio Scandurra 9c7ac692c0 Merge pull request #1288 from zed-industries/line-ending-fixes
Line ending fixes
2022-07-06 11:33:52 +02:00
Antonio Scandurra 0f77fd8b2d Replace lone carriage returns with newlines 2022-07-06 11:00:56 +02:00
Antonio Scandurra 862e11cc09 Don't slice midway through multi-byte char when detecting line ending 2022-07-06 10:21:30 +02:00
Max Brunsfeld 192155d977 0.44 2022-07-05 17:37:04 -07:00
Max Brunsfeld 5b4d940f08 Merge pull request #1287 from zed-industries/handle-carriage-returns-in-edits
Fix crash when pasting text with CRLF line endings
2022-07-05 17:35:38 -07:00
Max BrunsfeldandKeith Simmons e6c9549bbd Strip carriage returns from all text in text::Buffer
* Moving the logic from Rope to text::Buffer makes it easier
  to keep the Rope in sync with the fragment tree.
* Removing carriage return characters is lossier, but is much
  simpler than incrementally maintaining the invariant that
  there are no carriage returns followed by newlines. We may
  want to do something smarter in the future.

Co-authored-by: Keith Simmons <keith@zed.dev>
2022-07-05 17:25:09 -07:00
Mikayla Maki 7dd8f2289d Merge pull request #1286 from zed-industries/grid-renderer
Switch from line-and-character renderer to a direct grid renderer
2022-07-05 17:16:00 -07:00
Mikayla Maki ccab931a69 changed renderer 2022-07-05 17:10:01 -07:00
Keith Simmons 679122e7d1 Merge pull request #1271 from zed-industries/matching-bracket-highlights
Highlight matching bracket when newest selection head is on a bracket
2022-07-05 16:51:46 -07:00
Keith Simmons dd4df050e5 remove partial edit from normal.rs 2022-07-05 16:48:12 -07:00
Keith Simmons cc567846e3 fix error with reverse range marked text ranges 2022-07-05 16:44:45 -07:00
Keith Simmons dcc3f6731f highlight both brackets, only when empty selection, and add test 2022-07-05 15:19:05 -07:00
Mikayla Maki 5b808bae86 Working on grid rendering 2022-07-05 15:10:34 -07:00
Mikayla Maki 870dd175a3 Merge pull request #1285 from zed-industries/fix-terminal-backspace
Set up basic enviroment variables
2022-07-05 15:08:16 -07:00
Mikayla Maki c9e8aebb0f Set up basic enviroment variables 2022-07-05 15:02:58 -07:00
Max Brunsfeld 69ed736484 Change Buffer constructors to construct the History internally 2022-07-05 14:51:52 -07:00
Max Brunsfeld 0d0644c3a8 Merge pull request #1282 from zed-industries/context-menu-below-project-panel-entries
Select the last worktree root when right-clicking below all project panel entries
2022-07-05 13:33:50 -07:00
Max Brunsfeld 190658f40f Select the last root when right-clicking below all project panel entries 2022-07-05 13:21:41 -07:00
Max Brunsfeld ffebb9704e Merge pull request #1281 from zed-industries/open-default-key-bindings
Add application menu item to open default key bindings
2022-07-05 13:20:22 -07:00
Max Brunsfeld acc7492a9f Add application menu item to open default key bindings 2022-07-05 12:41:38 -07:00
Max Brunsfeld 4e8fe063d5 0.43 2022-07-05 10:46:22 -07:00
Antonio Scandurra bc8cc9485b Merge pull request #1279 from zed-industries/autosave
Introduce autosave
2022-07-05 19:29:31 +02:00
Antonio Scandurra 384ba2bd2e Fix panics in database tests 2022-07-05 17:59:40 +02:00
Antonio Scandurra 633498c9a6 Remove non-determinism from autosave after delay 2022-07-05 17:54:54 +02:00
Antonio Scandurra 0d3eee7ab5 Always finish previous autosave before starting a new one 2022-07-05 17:51:01 +02:00
Antonio Scandurra 68d5f24dc6 Add unit test for autosave 2022-07-05 17:51:01 +02:00
Antonio Scandurra 4ddcac081c Add unit test for ViewContext::observe_window_activation 2022-07-05 17:51:01 +02:00
Antonio Scandurra 57d6cb29b4 Honor Autosave setting in Editor 2022-07-05 17:51:01 +02:00
Antonio Scandurra 7eeea94830 Add ViewContext::observe_window_activation 2022-07-05 17:51:01 +02:00
Antonio Scandurra 47b1b9da33 Fix unsafe memory access when converting entity handles 2022-07-05 17:50:57 +02:00
Antonio Scandurra b0ecd7d483 Introduce a new, language-overridable Autosave setting 2022-07-05 09:25:22 +02:00
Antonio Scandurra 1b9c64a905 Merge pull request #1278 from zed-industries/sync-line-ending
Transmit new line ending when buffer is reloaded
2022-07-05 08:07:38 +02:00
Antonio Scandurra a90a086c3e Transmit new line ending when buffer is reloaded 2022-07-05 08:01:14 +02:00
Max Brunsfeld 37e024b5c1 Merge pull request #1277 from zed-industries/scale-factor-change
Recalculate Metal layer's drawable size when window's scale factor changes
2022-07-04 15:21:44 -07:00
Max Brunsfeld 7b6d8b63f3 Recalculate Metal layer's drawable size when window's scale factor changes 2022-07-04 15:14:08 -07:00
Max Brunsfeld 81e74fa87f Merge pull request #1276 from zed-industries/handle-carriage-returns
Handle files with CRLF (windows-style) line endings
2022-07-04 13:40:28 -07:00
Max Brunsfeld abaa2837a3 Normalize line endings consistently between fake and real FS 2022-07-04 13:00:12 -07:00
Max Brunsfeld bf20993000 Rename NewlineStyle -> LineEnding 2022-07-04 12:47:40 -07:00
Max Brunsfeld 31ca4c5efa Handle a file's line endings changing on disk 2022-07-04 12:30:28 -07:00