Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c3334eb

Browse files
authored
Merge pull request #3142 from danielleontiev/text-document-format-no-changes
fix: return empty response to textDocument/formatting if no changes
2 parents 1c02832 + 0431762 commit c3334eb

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

‎changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
## Unreleased
44
<!-- Add all new changes here. They will be moved under a version at release -->
5-
`2025年3月13日`
65
* `NEW` `unnecessary-assert` diagnostic warns when asserting values that are always truthy
76
* `NEW` locale `es-419`, thanks [Felipe Lema](https://codeberg.org/FelipeLema)
7+
* `FIX` prevent unnecessary edits by LSP formatting when content did not change
88

99
## 3.13.9
1010
`2025年3月13日`

‎script/core/formatting.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ return function(uri, options)
2121
return
2222
end
2323

24+
if text == formattedText then
25+
return
26+
end
27+
2428
return {
2529
{
2630
start = state.ast.start,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /