-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Description
Upon opening Zed, I discovered that the code was folded at unexpected locations, such as within words, letters, and other characters.
There seems to be at least 3 related issues:
First Issue
While the issue is not as pronounced in the provided screenshot, it occasionally occurs even when the application is open. For instance, suppose the code in lines 280 to 310 is folded, and I am currently working in lines 120 to 130. After some time, when I scroll down to view the folded code in lines 280 to 310, it appears significantly altered.
Second Issue
The folds do not persist anytime I install a new Zed update.
I recently found out that the issue is not only limited to installing a Zed update, but also occurs when I open Zed, then close (quit) it without editing any files (the folds are still visible), and then open it again. All the folds disappear.
Third Issue
The code folds are preserved between restarts only for the file which was focused when closing Zed.
All other files of the same project which were open in other tabs in the background while closing Zed did not preserve their folds.
In addition, I would like to suggest some modifications to enhance the visual representation of folded code. Consider this screenshot:
Observe that the folded line is highlighted with a subtle blue tint. Furthermore, the midline horizontal ellipsis (⋯) has a distinct background colour and is immediately preceded by the closing brackets.
With the exception of Python files (which do not utilise curly brackets), I believe this approach is the most effective method for representing folded code.
Zed Version and System Specs
Zed: v0.184.9 (Zed)
OS: macOS 15.4.1
Memory: 8 GiB
Architecture: aarch64