Skip to content

Commit

Permalink
Making the progress an integer, as per the specification (MaskRay#739)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlahoda authored Dec 26, 2020
1 parent 4c66fdf commit 4ff22e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lsp.hh
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ struct WorkDoneProgress {
const char *kind;
std::optional<std::string> title;
std::optional<std::string> message;
std::optional<double> percentage;
std::optional<int> percentage;
};
struct WorkDoneProgressParam {
const char *token;
Expand Down
2 changes: 1 addition & 1 deletion src/pipeline.cc
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ void mainLoop() {
(Twine(completed - last_idle) + "/" + Twine(enqueued - last_idle))
.str();
param.value.percentage =
100.0 * (completed - last_idle) / (enqueued - last_idle);
100 * (completed - last_idle) / (enqueued - last_idle);
notify("$/progress", param);
} else if (in_progress) {
stats.last_idle.store(enqueued, std::memory_order_relaxed);
Expand Down

0 comments on commit 4ff22e6

Please sign in to comment.