CARVIEW |
Select Language
HTTP/2 200
date: Mon, 28 Jul 2025 04:09:51 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/neovim/neovim.git
etag: W/"5fcc2eacd123ca943797021599daed4a"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=ichcJYmnWoV6ahjBNdZew1EsB2sN7jjnexGaNTSZ5h0bOqwat85OTF4ZpwJusQNjIEqSK8M431KePJ8WGsQggKQIAKPxwZ2UAgzTe7AEYovbGpB9mySz3fC6QFJJMXbIfThhx3eMXJOSR67Jf1%2B7wGc32DLPAvquMeL04%2BxLRSHe7iL9L69jlR9Z66ag7OUR3uKNEP7GbuHEGYrxHbBNW0j%2FxQ4snnv5ZCBKTxMOHIqhN2a4n9u3WkCRpZbmCxBNGUvHDKMAcZuhYJg6S1ebbw%3D%3D--EFqiyTChgGPoZnfP--LwSNKZeXfpTNWK5YLPrNLw%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1706092205.1753675791; Path=/; Domain=github.com; Expires=Tue, 28 Jul 2026 04:09:51 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Tue, 28 Jul 2026 04:09:51 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: AD5E:0A67:89752A:B5F30A:6886F80F
fix(diagnostic): deepcopy diagnostics before clamping line numbers · neovim/neovim@2abc799 · GitHub
Copy file name to clipboardExpand all lines: runtime/lua/vim/diagnostic.lua
Copy file name to clipboardExpand all lines: runtime/lua/vim/lsp/diagnostic.lua
Copy file name to clipboardExpand all lines: test/functional/lua/diagnostic_spec.lua
Skip to content
Navigation Menu
{{ message }}
-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Commit 2abc799
committed
fix(diagnostic): deepcopy diagnostics before clamping line numbers
The current 'clamp_line_numbers' implementation modifies diagnostics in
place, which can have adverse downstream side effects. Before clamping
line numbers, make a copy of the diagnostic. This commit also merges the
'clamp_line_numbers' method into a new 'get_diagnostics' local function
which also implements the more general "get" method. The public
'vim.diagnostic.get()' API now just uses this function (without
clamping). This has the added benefit that other internal API functions
that need to use get() no longer have to go through vim.validate.
Finally, reorganize the source code a bit by grouping all of the data
structures together near the top of the file.1 parent 9ec4417 commit 2abc799Copy full SHA for 2abc799
File tree
Expand file treeCollapse file tree
3 files changed
+89
-102
lines changedFilter options
- runtime/lua/vim
- lsp
- test/functional/lua
Expand file treeCollapse file tree
3 files changed
+89
-102
lines changedruntime/lua/vim/diagnostic.lua
Copy file name to clipboardExpand all lines: runtime/lua/vim/diagnostic.lua+82-97Lines changed: 82 additions & 97 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
36 | 36 |
| |
37 | 37 |
| |
38 | 38 |
| |
39 |
| - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
40 | 70 |
| |
41 | 71 |
| |
42 | 72 |
| |
| |||
106 | 136 |
| |
107 | 137 |
| |
108 | 138 |
| |
109 |
| - | |
110 |
| - | |
111 | 139 |
| |
112 | 140 |
| |
113 | 141 |
| |
| |||
213 | 241 |
| |
214 | 242 |
| |
215 | 243 |
| |
216 |
| - | |
217 |
| - | |
218 |
| - | |
219 |
| - | |
220 |
| - | |
221 |
| - | |
222 |
| - | |
223 |
| - | |
224 |
| - | |
225 |
| - | |
226 |
| - | |
227 |
| - | |
228 |
| - | |
229 |
| - | |
230 |
| - | |
231 |
| - | |
232 |
| - | |
233 |
| - | |
234 |
| - | |
235 |
| - | |
236 |
| - | |
237 |
| - | |
238 |
| - | |
239 |
| - | |
240 |
| - | |
241 |
| - | |
242 |
| - | |
243 |
| - | |
244 |
| - | |
245 |
| - | |
246 | 244 |
| |
247 | 245 |
| |
248 | 246 |
| |
| |||
399 | 397 |
| |
400 | 398 |
| |
401 | 399 |
| |
402 |
| - | |
403 |
| - | |
404 |
| - | |
405 |
| - | |
406 |
| - | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
407 | 417 |
| |
408 | 418 |
| |
409 |
| - | |
410 |
| - | |
411 |
| - | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
412 | 447 |
| |
| 448 | + | |
| 449 | + | |
413 | 450 |
| |
414 | 451 |
| |
415 | 452 |
| |
| |||
418 | 455 |
| |
419 | 456 |
| |
420 | 457 |
| |
421 |
| - | |
422 |
| - | |
| 458 | + | |
423 | 459 |
| |
424 | 460 |
| |
425 | 461 |
| |
| |||
481 | 517 |
| |
482 | 518 |
| |
483 | 519 |
| |
484 |
| - | |
485 |
| - | |
486 |
| - | |
487 |
| - | |
488 | 520 |
| |
489 | 521 |
| |
490 | 522 |
| |
| |||
689 | 721 |
| |
690 | 722 |
| |
691 | 723 |
| |
692 |
| - | |
693 |
| - | |
694 |
| - | |
695 |
| - | |
696 |
| - | |
697 |
| - | |
698 |
| - | |
699 |
| - | |
700 |
| - | |
701 |
| - | |
702 |
| - | |
703 |
| - | |
704 |
| - | |
705 |
| - | |
706 |
| - | |
707 |
| - | |
708 |
| - | |
709 |
| - | |
710 |
| - | |
711 |
| - | |
712 |
| - | |
713 |
| - | |
714 |
| - | |
715 |
| - | |
716 |
| - | |
717 |
| - | |
718 |
| - | |
719 |
| - | |
720 |
| - | |
721 |
| - | |
722 |
| - | |
723 |
| - | |
724 |
| - | |
725 |
| - | |
726 |
| - | |
727 |
| - | |
728 |
| - | |
729 |
| - | |
730 |
| - | |
731 |
| - | |
732 |
| - | |
733 |
| - | |
734 |
| - | |
| 724 | + | |
735 | 725 |
| |
736 | 726 |
| |
737 | 727 |
| |
| |||
1115 | 1105 |
| |
1116 | 1106 |
| |
1117 | 1107 |
| |
1118 |
| - | |
| 1108 | + | |
1119 | 1109 |
| |
1120 | 1110 |
| |
1121 | 1111 |
| |
| |||
1141 | 1131 |
| |
1142 | 1132 |
| |
1143 | 1133 |
| |
1144 |
| - | |
1145 |
| - | |
1146 | 1134 |
| |
1147 | 1135 |
| |
1148 | 1136 |
| |
| |||
1213 | 1201 |
| |
1214 | 1202 |
| |
1215 | 1203 |
| |
1216 |
| - | |
1217 |
| - | |
| 1204 | + | |
1218 | 1205 |
| |
1219 | 1206 |
| |
1220 | 1207 |
| |
| |||
1563 | 1550 |
| |
1564 | 1551 |
| |
1565 | 1552 |
| |
1566 |
| - | |
1567 |
| - | |
1568 | 1553 |
|
runtime/lua/vim/lsp/diagnostic.lua
Copy file name to clipboardExpand all lines: runtime/lua/vim/lsp/diagnostic.lua-2Lines changed: 0 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
717 | 717 |
| |
718 | 718 |
| |
719 | 719 |
| |
720 |
| - | |
721 |
| - |
test/functional/lua/diagnostic_spec.lua
Copy file name to clipboardExpand all lines: test/functional/lua/diagnostic_spec.lua+7-3Lines changed: 7 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
110 | 110 |
| |
111 | 111 |
| |
112 | 112 |
| |
113 |
| - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
114 | 118 |
| |
115 | 119 |
| |
116 | 120 |
| |
117 |
| - | |
| 121 | + | |
118 | 122 |
| |
119 | 123 |
| |
120 | 124 |
| |
121 | 125 |
| |
122 | 126 |
| |
123 |
| - | |
| 127 | + | |
124 | 128 |
| |
125 | 129 |
| |
126 | 130 |
| |
|
You can’t perform that action at this time.
0 commit comments