Commit graph

4849 commits

Author SHA1 Message Date
Antonio Scandurra
113eb9b94f Don't slice midway through multi-byte char when detecting line ending 2022-07-06 10:21:30 +02:00
Max Brunsfeld
5e2306d0e0 0.44 2022-07-05 17:37:04 -07:00
Max Brunsfeld
77d688b4fb
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 Brunsfeld
7e9beaf4bb 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
4d88088ca4
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
03cbb94057 changed renderer 2022-07-05 17:10:01 -07:00
Keith Simmons
58e57d0150
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
229bc94ac3 remove partial edit from normal.rs 2022-07-05 16:48:12 -07:00
Keith Simmons
956dd0c2bc fix error with reverse range marked text ranges 2022-07-05 16:44:45 -07:00
Keith Simmons
1f3dc2f534 highlight both brackets, only when empty selection, and add test 2022-07-05 15:19:05 -07:00
Mikayla Maki
342d38a9fb Working on grid rendering 2022-07-05 15:10:34 -07:00
Mikayla Maki
e14b3db68a
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
b4dc92dddc Set up basic enviroment variables 2022-07-05 15:02:58 -07:00
Max Brunsfeld
116fa92e84 Change Buffer constructors to construct the History internally 2022-07-05 14:51:52 -07:00
Max Brunsfeld
1add2d270e
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
4aa19c1a7f Select the last root when right-clicking below all project panel entries 2022-07-05 13:21:41 -07:00
Max Brunsfeld
7ea128951f
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
8048758990 Add application menu item to open default key bindings 2022-07-05 12:41:38 -07:00
Max Brunsfeld
ea1f6d6e00 0.43 2022-07-05 10:46:22 -07:00
Antonio Scandurra
1682cbd457
Merge pull request #1279 from zed-industries/autosave
Introduce autosave
2022-07-05 19:29:31 +02:00
Antonio Scandurra
f1ffcb626a Fix panics in database tests 2022-07-05 17:59:40 +02:00
Antonio Scandurra
f09d265054 Remove non-determinism from autosave after delay 2022-07-05 17:54:54 +02:00
Antonio Scandurra
a5c39acf4c Always finish previous autosave before starting a new one 2022-07-05 17:51:01 +02:00
Antonio Scandurra
ebf4bae173 Add unit test for autosave 2022-07-05 17:51:01 +02:00
Antonio Scandurra
d43e8b270a Add unit test for ViewContext::observe_window_activation 2022-07-05 17:51:01 +02:00
Antonio Scandurra
885172f4dd Honor Autosave setting in Editor 2022-07-05 17:51:01 +02:00
Antonio Scandurra
d589017a80 Add ViewContext::observe_window_activation 2022-07-05 17:51:01 +02:00
Antonio Scandurra
7a6010e7dc Fix unsafe memory access when converting entity handles 2022-07-05 17:50:57 +02:00
Antonio Scandurra
4b533c339d Introduce a new, language-overridable Autosave setting 2022-07-05 09:25:22 +02:00
Antonio Scandurra
8f021d8ca8
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
eac76df0ac Transmit new line ending when buffer is reloaded 2022-07-05 08:01:14 +02:00
Max Brunsfeld
3b67ccc62c
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
6f49f4a9cf Recalculate Metal layer's drawable size when window's scale factor changes 2022-07-04 15:14:08 -07:00
Max Brunsfeld
f82dda9981
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
c1b886b0ce Normalize line endings consistently between fake and real FS 2022-07-04 13:00:12 -07:00
Max Brunsfeld
9804c683c0 Rename NewlineStyle -> LineEnding 2022-07-04 12:47:40 -07:00
Max Brunsfeld
0ba12eab22 Handle a file's line endings changing on disk 2022-07-04 12:30:28 -07:00
Max Brunsfeld
b0efa4f5c1 Move project tests into their own file 2022-07-04 12:00:15 -07:00
Max Brunsfeld
317060913c
Merge pull request #1275 from zed-industries/delete-autoclose-pair
Delete the autoclosing bracket when deleting the opening bracket
2022-07-04 10:57:06 -07:00
Max Brunsfeld
771a834d84 Delete the autoclosing bracket when deleting the opening bracket 2022-07-04 10:46:35 -07:00
Antonio Scandurra
d80ecb6f98 Ignore carriage returns when reloading buffer 2022-07-04 17:40:35 +02:00
Antonio Scandurra
3480b50920 Detect buffer newline style and honor it when saving 2022-07-04 17:40:26 +02:00
Antonio Scandurra
f9bad2d81d Replace \r and \r\n with \n when indexing text into the rope 2022-07-04 15:37:40 +02:00
Antonio Scandurra
582185b8cb
Merge pull request #1274 from zed-industries/fix-enter-numpad
Support hitting enter on numpad
2022-07-04 10:08:47 +02:00
Antonio Scandurra
9a6092dd1b Support hitting enter on numpad 2022-07-04 10:01:56 +02:00
Antonio Scandurra
ff96a7cce2
Merge pull request #1262 from zed-industries/user-timeline
Improve user activity tracking
2022-07-04 09:28:40 +02:00
Antonio Scandurra
d3b9eca791 Merge branch 'main' into user-timeline 2022-07-04 09:23:16 +02:00
Antonio Scandurra
0b2452f666
Merge pull request #1265 from zed-industries/worktree-performance
Fix problems that arise when large numbers of files change on disk
2022-07-04 09:19:18 +02:00
Antonio Scandurra
aca757a02d Don't poll snapshot if processing events unless user manually changed fs 2022-07-04 08:10:31 +02:00
Keith Simmons
9b36e3d009 Highlight matching bracket when newest selection head is on a bracket 2022-07-01 15:06:16 -07:00