zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
49.36k stars 3k forks source link

Buffer clips horizontally after 1024 characters on a single line #834

Closed iamnbutler closed 2 years ago

iamnbutler commented 2 years ago

Find also will not show a match beyond 1024 characters wide.

Repro:

Paste the following on a single line, try to scroll horizontally to the end.

<path d="M8.35847 18.5466C8.35847 18.6353 8.25645 18.7063 8.12782 18.7063C7.98145 18.7196 7.87944 18.6486 7.87944 18.5466C7.87944 18.4579 7.98145 18.3869 8.11008 18.3869C8.24314 18.3736 8.35847 18.4446 8.35847 18.5466ZM6.97903 18.347C6.94798 18.4357 7.03669 18.5377 7.16976 18.5644C7.28508 18.6087 7.41815 18.5644 7.44476 18.4756C7.47137 18.3869 7.3871 18.2849 7.25403 18.245C7.13871 18.214 7.01008 18.2583 6.97903 18.347ZM8.93952 18.2716C8.81089 18.3027 8.72218 18.3869 8.73548 18.489C8.74879 18.5777 8.86411 18.6353 8.99718 18.6043C9.12581 18.5732 9.21452 18.489 9.20121 18.4002C9.1879 18.316 9.06814 18.2583 8.93952 18.2716ZM11.8581 1.27484C5.70605 1.27484 1 5.94541 1 12.0974C1 17.0164 4.09597 21.2256 8.51815 22.7071C9.08589 22.8091 9.28548 22.4587 9.28548 22.1704C9.28548 21.8954 9.27218 20.3785 9.27218 19.447C9.27218 19.447 6.16734 20.1123 5.51532 18.1252C5.51532 18.1252 5.00968 16.8345 4.28226 16.5019C4.28226 16.5019 3.26653 15.8055 4.35323 15.8188C4.35323 15.8188 5.45766 15.9075 6.06532 16.9631C7.03669 18.6752 8.66452 18.1829 9.29879 17.8902C9.40081 17.1805 9.68911 16.6881 10.0085 16.3954C7.52903 16.1204 5.02742 15.7611 5.02742 11.4942C5.02742 10.2744 5.36452 9.66234 6.07419 8.8817C5.95887 8.59339 5.58185 7.40468 6.18952 5.87C7.11653 5.5817 9.25 7.06758 9.25 7.06758C10.1371 6.8192 11.0907 6.69057 12.0355 6.69057C12.9802 6.69057 13.9339 6.8192 14.821 7.06758C14.821 7.06758 16.9544 5.57726 17.8815 5.87C18.4891 7.40912 18.1121 8.59339 17.9968 8.8817C18.7065 9.66678 19.1411 10.2789 19.1411 11.4942C19.1411 15.7744 16.5286 16.116 14.0492 16.3954C14.4573 16.7458 14.8032 17.4111 14.8032 18.4535C14.8032 19.9482 14.7899 21.7978 14.7899 22.1615C14.7899 22.4498 14.994 22.8002 15.5573 22.6982C19.9927 21.2256 23 17.0164 23 12.0974C23 5.94541 18.0101 1.27484 11.8581 1.27484ZM5.31129 16.5728C5.25363 16.6172 5.26694 16.7192 5.34234 16.8035C5.41331 16.8744 5.51532 16.9055 5.57298 16.8478C5.63064 16.8035 5.61734 16.7015 5.54194 16.6172C5.47097 16.5462 5.36895 16.5152 5.31129 16.5728ZM4.83226 16.2135C4.80121 16.2712 4.84556 16.3422 4.93427 16.3865C5.00524 16.4309 5.09395 16.4176 5.125 16.3555C5.15605 16.2978 5.11169 16.2269 5.02298 16.1825C4.93427 16.1559 4.86331 16.1692 4.83226 16.2135ZM6.26935 17.7926C6.19839 17.8502 6.225 17.9833 6.32702 18.0676C6.42903 18.1696 6.55766 18.1829 6.61532 18.1119C6.67298 18.0543 6.64637 17.9212 6.55766 17.8369C6.46008 17.7349 6.32702 17.7216 6.26935 17.7926ZM5.76371 17.1406C5.69274 17.1849 5.69274 17.3002 5.76371 17.4023C5.83468 17.5043 5.95444 17.5486 6.0121 17.5043C6.08306 17.4466 6.08306 17.3313 6.0121 17.2293C5.95 17.1273 5.83468 17.0829 5.76371 17.1406Z" fill="black" />
nathansobo commented 2 years ago

I think we should soft wrap at 1024 characters no matter what.

non-bin commented 2 months ago

On mac 0.150.4. I'd like to be able to scroll infinitely, for example with csv files with thousands or columns

my lines are truncated but not wrapped at 1024, when using "soft_wrap": "none" wrapped at 512 when using "soft_wrap": "prefer_line" wrapped to window size when using "soft_wrap": "editor_width" wrapped to window size with "soft_wrap": "preferred_line_length", "preferred_line_length": 1024 (no matter the line length setting it acts like "soft_wrap": "editor_width")