Skip to content

Commit 4ff22e6

Browse files
authored
Making the progress an integer, as per the specification (#739)
1 parent 4c66fdf commit 4ff22e6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/lsp.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ struct WorkDoneProgress {
223223
const char *kind;
224224
std::optional<std::string> title;
225225
std::optional<std::string> message;
226-
std::optional<double> percentage;
226+
std::optional<int> percentage;
227227
};
228228
struct WorkDoneProgressParam {
229229
const char *token;

src/pipeline.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ void mainLoop() {
729729
(Twine(completed - last_idle) + "/" + Twine(enqueued - last_idle))
730730
.str();
731731
param.value.percentage =
732-
100.0 * (completed - last_idle) / (enqueued - last_idle);
732+
100 * (completed - last_idle) / (enqueued - last_idle);
733733
notify("$/progress", param);
734734
} else if (in_progress) {
735735
stats.last_idle.store(enqueued, std::memory_order_relaxed);

0 commit comments

Comments
 (0)